Closed xignor closed 2 years ago
For wanderers having this issue on iOS (or very similar, something about the JSI module not having the VM reference early on).. Make sure to init
RCTRootView
using the appropriate initializer with the help ofRCTBridgeDelegate
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"MyApp" initialProperties:initialProps];
Not
initWithBundleURL
This gives this error
Use of undeclared identifier 'initialProps'
Tried with
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self
launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"MyApp"
initialProperties:nil];
But now this gives another error and the app doesn't build
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate sourceURLForBridge:]: unrecognized selector sent to instance 0x283b010e0'
Any updates here?
Tried with
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"MyApp" initialProperties:nil];
But now this gives another error and the app doesn't build
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate sourceURLForBridge:]: unrecognized selector sent to instance 0x283b010e0'
Any updates here?
You need to conform to RCTBridgeDelegate
in order to use these bridge and view initializers.
See the following gist for a complete example.
https://gist.github.com/ybonnetain/7b3e510050447ae52c0f8d6dd741d9d4
@ybonnetain it's giving a compilation error
Use of undeclared identifier '$'
Here is my AppDelegate.m
Stuck on this issue error since months now.
Line 71, sorry it's @ not $.
But you also need to conform to RCTBridgeDelegate.
You may want to move this issue to stackoverflow and DM me the link ;)
@ybonnetain Facing issues. InstallCoreFunction seems to crash with another error . com.facebook.react.JavaScript (9): EXC_BAD_ACCESS (code=1, address=0xffffa0000c250698
was facing same problem "react-native": "0.66.0", "react-native-reanimated": "^2.3.0-beta.2",
I changed in android/app/build.gradle
project.ext.react = [ enableHermes: true ]
and in the MainApplication.java I added on top
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
and in the function ReactNative Host () I added@Override protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); }
It worked like a charm
hi. i can't find android/app/build.gradle on my pc.
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"MyApp" initialProperties:initialProps];
I don't know if you fix it but with the new react-native there is no more initialProperties:initialProps so instead of that use this solution but change initialPropertis:nil .
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"appName" initialProperties:nil];
That's how I made it work on react-native 0.68.1
Description
When running the app after 1.8 to 2 upgrade Reanimated throws this error:
Screenshots
Steps To Reproduce
Package versions