Skip to content

Commit e25947d

Browse files
committed
iOS working
1 parent 7e1c46e commit e25947d

11 files changed

+183
-1930
lines changed

ios/Podfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ node_require('react-native/scripts/react_native_pods.rb')
1111
node_require('react-native-permissions/scripts/setup.rb')
1212

1313
# Edge addition for Expo:
14-
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
14+
# require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
1515

1616
# Edge addition to disable advertising ID collection:
1717
$RNFirebaseAnalyticsWithoutAdIdSupport = true
@@ -47,14 +47,14 @@ end
4747

4848
target 'edge' do
4949
# Edge addition for Expo:
50-
use_expo_modules!
51-
post_integrate do |installer|
52-
begin
53-
expo_patch_react_imports!(installer)
54-
rescue => e
55-
Pod::UI.warn e
56-
end
57-
end
50+
# use_expo_modules!
51+
# post_integrate do |installer|
52+
# begin
53+
# expo_patch_react_imports!(installer)
54+
# rescue => e
55+
# Pod::UI.warn e
56+
# end
57+
# end
5858

5959
config = use_native_modules!
6060
use_react_native!(

ios/Podfile.lock

+1-61
Original file line numberDiff line numberDiff line change
@@ -61,36 +61,6 @@ PODS:
6161
- React-Core
6262
- edge-login-ui-rn (3.7.2):
6363
- React-Core
64-
- EXConstants (15.4.5):
65-
- ExpoModulesCore
66-
- EXFont (11.10.3):
67-
- ExpoModulesCore
68-
- Expo (50.0.14):
69-
- ExpoModulesCore
70-
- ExpoFileSystem (16.0.8):
71-
- ExpoModulesCore
72-
- ExpoKeepAwake (12.8.2):
73-
- ExpoModulesCore
74-
- ExpoModulesCore (1.11.12):
75-
- glog
76-
- hermes-engine
77-
- RCT-Folly (= 2022.05.16.00)
78-
- RCTRequired
79-
- RCTTypeSafety
80-
- React-Codegen
81-
- React-Core
82-
- React-debug
83-
- React-Fabric
84-
- React-graphics
85-
- React-ImageManager
86-
- React-NativeModulesApple
87-
- React-RCTAppDelegate
88-
- React-RCTFabric
89-
- React-rendererdebug
90-
- React-utils
91-
- ReactCommon/turbomodule/bridging
92-
- ReactCommon/turbomodule/core
93-
- Yoga
9464
- FBLazyVector (0.73.6)
9565
- Firebase/AnalyticsWithoutAdIdSupport (8.15.0):
9666
- Firebase/CoreOnly
@@ -187,8 +157,6 @@ PODS:
187157
- hermes-engine (0.73.6):
188158
- hermes-engine/Pre-built (= 0.73.6)
189159
- hermes-engine/Pre-built (0.73.6)
190-
- ImageColors (2.4.0):
191-
- ExpoModulesCore
192160
- libevent (2.1.12)
193161
- libwebp (1.2.1):
194162
- libwebp/demux (= 1.2.1)
@@ -1918,16 +1886,9 @@ DEPENDENCIES:
19181886
- edge-currency-accountbased (from `../node_modules/edge-currency-accountbased`)
19191887
- edge-exchange-plugins (from `../node_modules/edge-exchange-plugins`)
19201888
- edge-login-ui-rn (from `../node_modules/edge-login-ui-rn`)
1921-
- EXConstants (from `../node_modules/expo-constants/ios`)
1922-
- EXFont (from `../node_modules/expo-font/ios`)
1923-
- Expo (from `../node_modules/expo`)
1924-
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
1925-
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
1926-
- ExpoModulesCore (from `../node_modules/expo-modules-core`)
19271889
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
19281890
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
19291891
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
1930-
- ImageColors (from `../node_modules/react-native-image-colors/ios`)
19311892
- libevent (~> 2.1.12)
19321893
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
19331894
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
@@ -2093,27 +2054,13 @@ EXTERNAL SOURCES:
20932054
:path: "../node_modules/edge-exchange-plugins"
20942055
edge-login-ui-rn:
20952056
:path: "../node_modules/edge-login-ui-rn"
2096-
EXConstants:
2097-
:path: "../node_modules/expo-constants/ios"
2098-
EXFont:
2099-
:path: "../node_modules/expo-font/ios"
2100-
Expo:
2101-
:path: "../node_modules/expo"
2102-
ExpoFileSystem:
2103-
:path: "../node_modules/expo-file-system/ios"
2104-
ExpoKeepAwake:
2105-
:path: "../node_modules/expo-keep-awake/ios"
2106-
ExpoModulesCore:
2107-
:path: "../node_modules/expo-modules-core"
21082057
FBLazyVector:
21092058
:path: "../node_modules/react-native/Libraries/FBLazyVector"
21102059
glog:
21112060
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
21122061
hermes-engine:
21132062
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
21142063
:tag: hermes-2024-02-20-RNv0.73.5-18f99ace4213052c5e7cdbcd39ee9766cd5df7e4
2115-
ImageColors:
2116-
:path: "../node_modules/react-native-image-colors/ios"
21172064
RCT-Folly:
21182065
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
21192066
RCTRequired:
@@ -2313,12 +2260,6 @@ SPEC CHECKSUMS:
23132260
edge-currency-accountbased: c64f86534b11c093f417cc58c56118b3e2bc3405
23142261
edge-exchange-plugins: b826d2e1a4b19e34eea2f737fabdb0951fcbce20
23152262
edge-login-ui-rn: f0887abbc2dcaf65a56ddd40263b724194ce4179
2316-
EXConstants: 988aa430ca0f76b43cd46b66e7fae3287f9cc2fc
2317-
EXFont: f20669cb266ef48b004f1eb1f2b20db96cd1df9f
2318-
Expo: e01a77c6fa4bc80a6d1bb949cda1d12d21044abd
2319-
ExpoFileSystem: eecaf6796aed0f4dd20042dc2ca2cac6c4bc1185
2320-
ExpoKeepAwake: 0f5cad99603a3268e50af9a6eb8b76d0d9ac956c
2321-
ExpoModulesCore: 5ba70816562a205894391952a4997b18d5d777b0
23222263
FBLazyVector: f64d1e2ea739b4d8f7e4740cde18089cd97fe864
23232264
Firebase: 5f8193dff4b5b7c5d5ef72ae54bb76c08e2b841d
23242265
FirebaseABTesting: 10cbce8db9985ae2e3847ea44e9947dd18f94e10
@@ -2335,7 +2276,6 @@ SPEC CHECKSUMS:
23352276
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
23362277
gRPC-Swift: 74adcaaa62ac5e0a018938840328cb1fdfb09e7b
23372278
hermes-engine: 9cecf9953a681df7556b8cc9c74905de8f3293c0
2338-
ImageColors: 88be684570585c07ae2750bff34eb7b78bfc53b4
23392279
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
23402280
libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
23412281
Logging: beeb016c9c80cf77042d62e83495816847ef108b
@@ -2452,6 +2392,6 @@ SPEC CHECKSUMS:
24522392
ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197
24532393
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
24542394

2455-
PODFILE CHECKSUM: 03f6685399abca74db3b218f6fe2e64309a56fff
2395+
PODFILE CHECKSUM: 8bfdeb5ce7b1cbf3183f55d4d017f689b6cab44f
24562396

24572397
COCOAPODS: 1.15.2

ios/edge.xcodeproj/project.pbxproj

-40
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,10 @@
3939
3D5BD9CE2A4D27C400590088 /* SourceSansPro-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3D5BD9B02A4D277B00590088 /* SourceSansPro-Bold.ttf */; };
4040
3D5BD9CF2A4D27F300590088 /* custom.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3D5BD9AD2A4D277B00590088 /* custom.ttf */; };
4141
3DB299A62BCEF2A600D867B0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3DB299A52BCEF2A600D867B0 /* PrivacyInfo.xcprivacy */; };
42-
812B284944A10A722B22763D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08ADAD14914ABC9FD7D54456 /* ExpoModulesProvider.swift */; };
4342
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
4443
/* End PBXBuildFile section */
4544

4645
/* Begin PBXFileReference section */
47-
08ADAD14914ABC9FD7D54456 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-edge/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
4846
13B07F961A680F5B00A75B9A /* Edge.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Edge.app; sourceTree = BUILT_PRODUCTS_DIR; };
4947
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = edge/AppDelegate.h; sourceTree = "<group>"; };
5048
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = edge/AppDelegate.mm; sourceTree = "<group>"; };
@@ -155,14 +153,6 @@
155153
name = Resources;
156154
sourceTree = "<group>";
157155
};
158-
61D03668B43B6EE95C40034D /* ExpoModulesProviders */ = {
159-
isa = PBXGroup;
160-
children = (
161-
DBEBA59143036B1EE984A6FC /* edge */,
162-
);
163-
name = ExpoModulesProviders;
164-
sourceTree = "<group>";
165-
};
166156
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
167157
isa = PBXGroup;
168158
children = (
@@ -182,7 +172,6 @@
182172
BBD78D7AC51CEA395F1C20DB /* Pods */,
183173
83CBBA001A601CBA00E9B192 /* Products */,
184174
3D5BD98C2A4D249A00590088 /* Resources */,
185-
61D03668B43B6EE95C40034D /* ExpoModulesProviders */,
186175
);
187176
indentWidth = 2;
188177
sourceTree = "<group>";
@@ -207,14 +196,6 @@
207196
path = Pods;
208197
sourceTree = "<group>";
209198
};
210-
DBEBA59143036B1EE984A6FC /* edge */ = {
211-
isa = PBXGroup;
212-
children = (
213-
08ADAD14914ABC9FD7D54456 /* ExpoModulesProvider.swift */,
214-
);
215-
name = edge;
216-
sourceTree = "<group>";
217-
};
218199
/* End PBXGroup section */
219200

220201
/* Begin PBXNativeTarget section */
@@ -224,7 +205,6 @@
224205
buildPhases = (
225206
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
226207
FD10A7F022414F080027D42C /* Start Packager */,
227-
0648866DE23523201A6698B1 /* [Expo] Configure project */,
228208
13B07F871A680F5B00A75B9A /* Sources */,
229209
13B07F8C1A680F5B00A75B9A /* Frameworks */,
230210
13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -345,25 +325,6 @@
345325
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-edge/Pods-edge-frameworks.sh\"\n";
346326
showEnvVarsInLog = 0;
347327
};
348-
0648866DE23523201A6698B1 /* [Expo] Configure project */ = {
349-
isa = PBXShellScriptBuildPhase;
350-
alwaysOutOfDate = 1;
351-
buildActionMask = 2147483647;
352-
files = (
353-
);
354-
inputFileListPaths = (
355-
);
356-
inputPaths = (
357-
);
358-
name = "[Expo] Configure project";
359-
outputFileListPaths = (
360-
);
361-
outputPaths = (
362-
);
363-
runOnlyForDeploymentPostprocessing = 0;
364-
shellPath = /bin/sh;
365-
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-edge/expo-configure-project.sh\"\n";
366-
};
367328
18D5C87BF6BD4974A24F472D /* Upload source maps to Bugsnag */ = {
368329
isa = PBXShellScriptBuildPhase;
369330
buildActionMask = 2147483647;
@@ -461,7 +422,6 @@
461422
13B07FC11A68108700A75B9A /* main.m in Sources */,
462423
3D5BD9882A4CEFC700590088 /* Base58.swift in Sources */,
463424
3D5BD9862A4CEFB900590088 /* EdgeCore.swift in Sources */,
464-
812B284944A10A722B22763D /* ExpoModulesProvider.swift in Sources */,
465425
);
466426
runOnlyForDeploymentPostprocessing = 0;
467427
};

ios/edge/AppDelegate.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import <RCTAppDelegate.h>
2-
#import <Expo/Expo.h>
2+
// #import <Expo/Expo.h>
33
#import <UIKit/UIKit.h>
44

5-
@interface AppDelegate : EXAppDelegateWrapper
5+
@interface AppDelegate : RCTAppDelegate
66

77
@end

ios/edge/AppDelegate.mm

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#import <React/RCTRootView.h>
66

77
// Edge additions:
8-
#import "ExpoModulesCore-Swift.h"
98
#import "Edge-Swift.h"
109
// #import "RNBootSplash.h"
1110
#import <Bugsnag/Bugsnag.h>

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@
109109
"edge-info-server": "^2.1.0",
110110
"edge-login-ui-rn": "^3.7.2",
111111
"ethers": "^5.7.2",
112-
"expo": "^50.0.0",
113112
"jsrsasign": "^11.1.0",
114113
"paraswap": "^5.2.0",
115114
"posthog-js": "^1.88.1",
@@ -134,7 +133,6 @@
134133
"react-native-gesture-handler": "^2.16.0",
135134
"react-native-get-random-values": "^1.9.0",
136135
"react-native-haptic-feedback": "^1.14.0",
137-
"react-native-image-colors": "^2.4.0",
138136
"react-native-image-picker": "^5.6.0",
139137
"react-native-in-app-review": "^4.3.3",
140138
"react-native-keyboard-aware-scroll-view": "^0.9.5",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff --git a/node_modules/@react-native-community/datetimepicker/ios/fabric/cpp/react/renderer/components/RNDateTimePicker/ComponentDescriptors.h b/node_modules/@react-native-community/datetimepicker/ios/fabric/cpp/react/renderer/components/RNDateTimePicker/ComponentDescriptors.h
2+
index 4a1a8e2..91aeb9d 100644
3+
--- a/node_modules/@react-native-community/datetimepicker/ios/fabric/cpp/react/renderer/components/RNDateTimePicker/ComponentDescriptors.h
4+
+++ b/node_modules/@react-native-community/datetimepicker/ios/fabric/cpp/react/renderer/components/RNDateTimePicker/ComponentDescriptors.h
5+
@@ -18,21 +18,21 @@ class RNDateTimePickerComponentDescriptor final : public ConcreteComponentDescri
6+
public:
7+
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
8+
9+
- void adopt(ShadowNode::Unshared const &shadowNode) const override {
10+
- react_native_assert(std::dynamic_pointer_cast<RNDateTimePickerShadowNode>(shadowNode));
11+
- auto pickerShadowNode = std::static_pointer_cast<RNDateTimePickerShadowNode>(shadowNode);
12+
-
13+
- react_native_assert(
14+
- std::dynamic_pointer_cast<YogaLayoutableShadowNode>(pickerShadowNode));
15+
- auto layoutableShadowNode =
16+
- std::static_pointer_cast<YogaLayoutableShadowNode>(pickerShadowNode);
17+
-
18+
- auto state = std::static_pointer_cast<const RNDateTimePickerShadowNode::ConcreteState>(shadowNode->getState());
19+
- auto stateData = state->getData();
20+
-
21+
- if(stateData.frameSize.width != 0 && stateData.frameSize.height != 0) {
22+
- layoutableShadowNode->setSize(Size{stateData.frameSize.width, stateData.frameSize.height});
23+
- }
24+
+ void adopt(ShadowNode &shadowNode) const override {
25+
+// react_native_assert(std::dynamic_pointer_cast<RNDateTimePickerShadowNode>(shadowNode));
26+
+// auto pickerShadowNode = std::static_pointer_cast<RNDateTimePickerShadowNode>(shadowNode);
27+
+//
28+
+// react_native_assert(
29+
+// std::dynamic_pointer_cast<YogaLayoutableShadowNode>(pickerShadowNode));
30+
+// auto layoutableShadowNode =
31+
+// std::static_pointer_cast<YogaLayoutableShadowNode>(pickerShadowNode);
32+
+//
33+
+// auto state = std::static_pointer_cast<const RNDateTimePickerShadowNode::ConcreteState>(shadowNode->getState());
34+
+// auto stateData = state->getData();
35+
+//
36+
+// if(stateData.frameSize.width != 0 && stateData.frameSize.height != 0) {
37+
+// layoutableShadowNode->setSize(Size{stateData.frameSize.width, stateData.frameSize.height});
38+
+// }
39+
40+
ConcreteComponentDescriptor::adopt(shadowNode);
41+
}

react-native.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ module.exports = {
99
project: {
1010
android: {
1111
unstable_reactLegacyComponentNames: [
12+
'EdgeCoreWebView'
1213
// list of conponents that needs to be wrapped by the interop layer
1314
]
1415
},
1516
ios: {
1617
unstable_reactLegacyComponentNames: [
18+
'BVLinearGradient',
19+
'EdgeCoreWebView'
1720
// list of conponents that needs to be wrapped by the interop layer
1821
]
1922
}

src/components/Main.tsx

+24-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createDrawerNavigator } from '@react-navigation/drawer'
33
import { DefaultTheme, NavigationContainer, useNavigation } from '@react-navigation/native'
44
import { createStackNavigator, StackNavigationOptions } from '@react-navigation/stack'
55
import * as React from 'react'
6-
import { Platform } from 'react-native'
6+
import { Platform, Text, View } from 'react-native'
77

88
import { getDeviceSettings } from '../actions/DeviceSettingsActions'
99
import { logoutRequest } from '../actions/LoginActions'
@@ -274,20 +274,33 @@ export const Main = () => {
274274
'setLegacyLanding'
275275
)
276276

277+
// return (
278+
// <NavigationContainer theme={reactNavigationTheme}>
279+
// <Stack.Navigator
280+
// initialRouteName="login"
281+
// screenOptions={{
282+
// headerShown: false
283+
// }}
284+
// >
285+
// <Stack.Screen name="login" component={Demo} />
286+
// </Stack.Navigator>
287+
// </NavigationContainer>
288+
// )
289+
277290
return (
278291
<>
279292
{experimentConfig == null ? (
280293
<LoadingSplashScreen />
281294
) : (
282295
<NavigationContainer theme={reactNavigationTheme}>
283296
<Stack.Navigator
284-
initialRouteName={ENV.USE_WELCOME_SCREENS ? 'gettingStarted' : 'login'}
297+
initialRouteName="login"
285298
screenOptions={{
286299
headerShown: false
287300
}}
288301
>
289302
<Stack.Screen name="edgeApp" component={EdgeApp} />
290-
<Stack.Screen name="gettingStarted" component={GettingStartedScene} initialParams={{ experimentConfig }} />
303+
<Stack.Screen name="gettingStarted" component={Demo} initialParams={{ experimentConfig }} />
291304
<Stack.Screen name="login" component={LoginScene} initialParams={{ experimentConfig }} options={{ animationEnabled: hasInitialScenesLoaded }} />
292305
</Stack.Navigator>
293306
</NavigationContainer>
@@ -296,6 +309,14 @@ export const Main = () => {
296309
)
297310
}
298311

312+
const Demo = () => {
313+
return (
314+
<View>
315+
<Text style={{ color: 'red' }}>"We have a core"</Text>
316+
</View>
317+
)
318+
}
319+
299320
const EdgeApp = () => {
300321
const backPressedOnce = React.useRef(false)
301322
const account = useSelector(state => state.core.account)

0 commit comments

Comments
 (0)