Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable react native new architecture #73

Merged
merged 3 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MainApplication : Application(), ReactApplication {
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
load(bridgelessEnabled = true)
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
Expand Down
2 changes: 1 addition & 1 deletion native_gg/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
Expand Down
87 changes: 70 additions & 17 deletions native_gg/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ PODS:
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.1)
- FBReactNativeSpec (0.73.1):
- RCT-Folly (= 2022.05.16.00)
- RCTRequired (= 0.73.1)
- RCTTypeSafety (= 0.73.1)
- React-Core (= 0.73.1)
- React-jsi (= 0.73.1)
- ReactCommon/turbomodule/core (= 0.73.1)
- Flipper (0.201.0):
- Flipper-Folly (~> 2.6)
- Flipper-Boost-iOSX (1.76.0.1.11)
Expand Down Expand Up @@ -116,17 +109,21 @@ PODS:
- React-callinvoker (0.73.1)
- React-Codegen (0.73.1):
- DoubleConversion
- FBReactNativeSpec
- glog
- hermes-engine
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-FabricImage
- React-graphics
- React-jsi
- React-jsiexecutor
- React-NativeModulesApple
- React-rncore
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- React-Core (0.73.1):
Expand Down Expand Up @@ -939,6 +936,8 @@ PODS:
- React-jsi (= 0.73.1)
- React-perflogger (= 0.73.1)
- React-jsinspector (0.73.1)
- React-jsitracing (0.73.1):
- React-jsi
- React-logger (0.73.1):
- glog
- React-Mapbuffer (0.73.1):
Expand Down Expand Up @@ -972,13 +971,21 @@ PODS:
- RCTTypeSafety
- React-Core
- React-CoreModules
- React-debug
- React-Fabric
- React-graphics
- React-hermes
- React-nativeconfig
- React-NativeModulesApple
- React-RCTFabric
- React-RCTImage
- React-RCTNetwork
- React-rendererdebug
- React-RuntimeApple
- React-RuntimeCore
- React-RuntimeHermes
- React-runtimescheduler
- React-utils
- ReactCommon
- React-RCTBlob (0.73.1):
- hermes-engine
Expand Down Expand Up @@ -1056,8 +1063,42 @@ PODS:
- RCT-Folly (= 2022.05.16.00)
- React-debug
- React-rncore (0.73.1)
- React-RuntimeApple (0.73.1):
- hermes-engine
- RCT-Folly/Fabric (= 2022.05.16.00)
- React-callinvoker
- React-Core/Default
- React-CoreModules
- React-cxxreact
- React-jserrorhandler
- React-jsi
- React-jsiexecutor
- React-Mapbuffer
- React-NativeModulesApple
- React-RCTFabric
- React-RuntimeCore
- React-runtimeexecutor
- React-RuntimeHermes
- React-utils
- React-RuntimeCore (0.73.1):
- glog
- hermes-engine
- RCT-Folly/Fabric (= 2022.05.16.00)
- React-cxxreact
- React-jserrorhandler
- React-jsi
- React-jsiexecutor
- React-runtimeexecutor
- React-runtimescheduler
- React-runtimeexecutor (0.73.1):
- React-jsi (= 0.73.1)
- React-RuntimeHermes (0.73.1):
- hermes-engine
- RCT-Folly/Fabric (= 2022.05.16.00)
- React-jsi
- React-jsitracing
- React-nativeconfig
- React-utils
- React-runtimescheduler (0.73.1):
- glog
- hermes-engine
Expand Down Expand Up @@ -1118,7 +1159,6 @@ DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.201.0)
- Flipper-Boost-iOSX (= 1.76.0.1.11)
- Flipper-DoubleConversion (= 3.2.0.1)
Expand Down Expand Up @@ -1165,6 +1205,7 @@ DEPENDENCIES:
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`)
- React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
Expand All @@ -1183,7 +1224,10 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`)
- React-rncore (from `../node_modules/react-native/ReactCommon`)
- React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`)
- React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`)
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`)
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
Expand Down Expand Up @@ -1212,8 +1256,6 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
:path: "../node_modules/react-native/React/FBReactNativeSpec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
hermes-engine:
Expand Down Expand Up @@ -1257,6 +1299,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
React-jsinspector:
:path: "../node_modules/react-native/ReactCommon/jsinspector-modern"
React-jsitracing:
:path: "../node_modules/react-native/ReactCommon/hermes/executor/"
React-logger:
:path: "../node_modules/react-native/ReactCommon/logger"
React-Mapbuffer:
Expand Down Expand Up @@ -1293,8 +1337,14 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/react/renderer/debug"
React-rncore:
:path: "../node_modules/react-native/ReactCommon"
React-RuntimeApple:
:path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios"
React-RuntimeCore:
:path: "../node_modules/react-native/ReactCommon/react/runtime"
React-runtimeexecutor:
:path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
React-RuntimeHermes:
:path: "../node_modules/react-native/ReactCommon/react/runtime"
React-runtimescheduler:
:path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler"
React-utils:
Expand All @@ -1309,7 +1359,6 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 2296bacb2fa157a43991048b0a9d71c1c8b65083
FBReactNativeSpec: 00c9b95ce75c53d6dfc543d9ba8f69572cd2054e
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Expand All @@ -1328,7 +1377,7 @@ SPEC CHECKSUMS:
RCTTypeSafety: df0f2632f4e89938b9b9f6152b5e6c66fc6e969e
React: 5373769b4a544945831d9c5d455212186d68f763
React-callinvoker: 2c54fb73b27fdf9bd7772f36dcda23d76e0e7d14
React-Codegen: 65b426d1c3185df0e1d901ff56a23d94e1974791
React-Codegen: 58e432fa3bfc14727140209266f89173a3e128b6
React-Core: f0e1e99728ebdb785286b0c4c55f0f923a9d826f
React-CoreModules: 1ee65dbd93429c1c6ec3de069d75f5fde05db5d5
React-cxxreact: dc0f1968914a6c7da62b1287c1eb84dd3ab0a7bb
Expand All @@ -1342,14 +1391,15 @@ SPEC CHECKSUMS:
React-jsi: b03ac7f7af1371e3e81e8ac894af4e46454dee79
React-jsiexecutor: ae30693413a40b7c72f25da2e794997754a780bf
React-jsinspector: 369048694e39942063c5d08e9580b43e2edd379a
React-jsitracing: 1c3d70eba0f634910d41c1c411fa24f3b9e1ee72
React-logger: e0c1e918d9588a9f39c9bc62d9d6bfe9ca238d9d
React-Mapbuffer: 9731a0a63ebaf8976014623c4d637744d7353a7c
React-nativeconfig: 37aecd26d64b79327c3f10e43b2e9a6c425e0a60
React-NativeModulesApple: 9ca6d2eaa1dd5606588262195b46d0774bdec83a
React-perflogger: 5ffc4d6ccb74eaac7b8b2867e58a447232483d6d
React-RCTActionSheet: eca2174431ff2cc14b7fb847f92b89e081d27541
React-RCTAnimation: a039b2416aa0a55e6fa7c8cd0a2e870bfffc4caa
React-RCTAppDelegate: be26c542774d36211b1562a9278c72f821887103
React-RCTAppDelegate: db52d0b28825225b6513e8ae0000e81c9097831f
React-RCTBlob: 0d4892d25e57fbbce13e221fff7e4c9567a2ace3
React-RCTFabric: d11187cac1f4e0141738805f7011145c7786a369
React-RCTImage: 5b70891cb2adb75bbdc5ad8e6cc56c48e95d90e5
Expand All @@ -1359,14 +1409,17 @@ SPEC CHECKSUMS:
React-RCTText: 08dd5d7173ed279d3468b333217afb22bb7948c3
React-RCTVibration: 2f906cd58dfd44ff5e4ca4fc0edd8740dceda6be
React-rendererdebug: e3db5db14234d9ee46d2e58fff3b8652ee7da6bc
React-rncore: 8b52cc253dcb365241989590ce097464810db205
React-rncore: 47f199474d2f295e72f9b73315b1b741068f2adf
React-RuntimeApple: 1953da441e3a07866fdaf708c091927a62c93bea
React-RuntimeCore: fa31b1ecef03d19bf8a84b37df9799f52613d348
React-runtimeexecutor: d87e84455640dc5685e87563c2eaef90e5df8752
React-RuntimeHermes: 28da5d7ec6c7a19d2cc3de9859e011831a95ff01
React-runtimescheduler: 93a4c84e46a85c3fc9678abd4f6923b785226ea7
React-utils: debda2c206770ee2785bdebb7f16d8db9f18838a
ReactCommon: ddb128564dcbfa0287d3d1a2d10f8c7457c971f6
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 4f53dc50008d626fa679c7a1cb4bed898f8c0bde

PODFILE CHECKSUM: 439ef8291a0e8bd3a01fc17f1042ac7ba1af67e7
PODFILE CHECKSUM: ce1f1e1a0af742a3dbfdffa2b69c3a0623238049

COCOAPODS: 1.14.3
12 changes: 10 additions & 2 deletions native_gg/ios/native_gg.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,17 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CFLAGS = (
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -654,13 +658,17 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CFLAGS = (
"$(inherited)",
"-DRN_FABRIC_ENABLED",
);
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DRN_FABRIC_ENABLED",
);
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down
5 changes: 5 additions & 0 deletions native_gg/ios/native_gg/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (BOOL)bridgelessEnabled
{
return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
Expand Down
1 change: 1 addition & 0 deletions native_gg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"pod-install": "cd ios && bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install",
"lint": "eslint .",
"start": "react-native start --verbose",
"test": "jest"
Expand Down