diff --git a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm index f780a8911279..725c37baf52b 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm @@ -45,6 +45,10 @@ - (JSRuntimeFactoryRef)createJSRuntimeFactory { #if USE_THIRD_PARTY_JSC != 1 return jsrt_create_hermes_factory(); +#else + [NSException raise:@"JSRuntimeFactory" + format:@"createJSRuntimeFactory must be overridden when using third-party JSC"]; + return nil; #endif } diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index d157fce21723..264891cf10a3 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -78,7 +78,7 @@ def use_react_native! ( react_native_path = Pod::Config.instance.installation_root.join(path) prefix = react_native_path.relative_path_from(Pod::Config.instance.installation_root) - hermes_enabled= true + hermes_enabled= !use_third_party_jsc() # Set the app_path as env variable so the podspecs can access it. ENV['APP_PATH'] = app_path ENV['REACT_NATIVE_PATH'] = react_native_path.to_s