Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/funny-monkeys-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rnx-kit/react-native-host": patch
---

Handle removal of `RCTEnableTurboModuleInteropBridgeProxy` and New Arch flags in `ReactNativeFeatureFlags`
9 changes: 8 additions & 1 deletion packages/react-native-host/cocoa/RNXBridgelessHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,31 @@ class RNXBridgelessFeatureFlags : public facebook::react::ReactNativeFeatureFlag
{
return true;
}

#ifndef RCT_REMOVE_LEGACY_ARCH
bool enableFabricRenderer() override
{
return true;
}

bool useTurboModules() override
{
return true;
}
#endif // !RCT_REMOVE_LEGACY_ARCH

bool useNativeViewConfigsInBridgelessMode() override
{
return true;
}

#if USE_VIEW_COMMAND_RACE_FIX // 0.77
bool enableFixForViewCommandRace() override
{
return true;
}
#endif // USE_VIEW_COMMAND_RACE_FIX
#endif // USE_VIEW_COMMAND_RACE_FIX

#if USE_UPDATE_RUNTIME_SHADOW_NODE_REFS_ON_COMMIT // >= 0.79
bool useShadowNodeStateOnClone() override
{
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native-host/cocoa/RNXFeatureMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
#define USE_UPDATE_RUNTIME_SHADOW_NODE_REFS_ON_COMMIT 1
#endif // __has_include(<React-RCTAppDelegate/RCTJSRuntimeConfiguratorProtocol.h>)

#if !__has_include(<React/RCTCxxMethod.h>) // >=0.87
#define RCT_REMOVE_LEGACY_ARCH 1
#endif // !__has_include(<React/RCTCxxMethod.h>)

#endif // USE_FEATURE_FLAGS

#endif // USE_BRIDGELESS
11 changes: 7 additions & 4 deletions packages/react-native-host/cocoa/ReactNativeHost.mm
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,12 @@ - (void)initializeReactHost
#ifndef USE_UNIFIED_FEATURE_FLAGS
RCTSetUseNativeViewConfigsInBridgelessMode(YES);
#endif

RCTEnableTurboModuleInterop(YES);

#ifndef RCT_REMOVE_LEGACY_ARCH
RCTEnableTurboModuleInteropBridgeProxy(YES);
#endif // !RCT_REMOVE_LEGACY_ARCH

#ifdef USE_REACT_NATIVE_CONFIG
_reactNativeConfig = std::make_shared<ReactNativeConfig>();
Expand All @@ -307,10 +311,9 @@ - (void)initializeReactHost
};

__weak __typeof(self) weakSelf = self;
if ([RCTHost instancesRespondToSelector:@selector
(initWithBundleURLProvider:
hostDelegate:turboModuleManagerDelegate:jsEngineProvider
:launchOptions:)]) {
if ([RCTHost instancesRespondToSelector:
@selector(initWithBundleURLProvider:hostDelegate:turboModuleManagerDelegate:
jsEngineProvider:launchOptions:)]) {
_reactHost = [[RCTHost alloc]
initWithBundleURLProvider:^{
return [weakSelf sourceURLForBridge:nil];
Expand Down
4 changes: 2 additions & 2 deletions packages/test-app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ PODS:
- React-utils (= 0.85.2)
- ReactNativeDependencies
- ReactNativeDependencies (0.85.2)
- ReactNativeHost (0.5.16):
- ReactNativeHost (0.5.17):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -2128,7 +2128,7 @@ SPEC CHECKSUMS:
ReactCodegen: 4accda6590329e2bbb1f1381b39b77d64490c7f4
ReactCommon: a804bb8d1dcf3ecdec3a77eb8bba19b7863bbbdb
ReactNativeDependencies: 91cc996bd7c2c58741b96d60817f51ad6692f404
ReactNativeHost: 60fee0812001bb7fe6b917c3bd75744c05034950
ReactNativeHost: bfc03f71af9ea8533b3f77493ca49d6c40093397
ReactTestApp-DevSupport: d9358fe3b2dc09399c15731ed8c17bd8388cf512
ReactTestApp-MSAL: 778502496ada0c04f0a96cbcc8359d681c458ace
ReactTestApp-Resources: 70da1d78d943a1fdff6362ce3f778e5b4560c95a
Expand Down
Loading