[v2][iOS] Upgraded to RN 0.59 issue with AppDelegate.m
Issue Description
I've upgraded my react-native to the stable 0.59 release but am receiving a console warning that contains the following error:
Unable to define method 'getConstants()' on NativeModule 'RNNBridgeModule'. NativeModule 'RNNBridgeModule' already has a constant or method called 'getConstants'. Please remove it.
This only occurs after installing RNN.
Steps to Reproduce / Code Snippets / Screenshots
AppDelegate.m
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
[ReactNativeNavigation bootstrap:[self sourceURLForBridge: bridge] launchOptions:launchOptions];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
Environment
- React Native Navigation version: 2.13.1
- React Native version: 0.59.0
- Platform(s) (iOS, Android, or both?): iOS
- Device info (Simulator/Device? OS version? Debug/Release?): iPhone 6 (Debug)
https://github.com/wix/react-native-navigation/issues/4853#issuecomment-472353418
I tried that solution but it failed to work. I'm also receiving messages in my console that may be related:
PerformanceLogger: Attempting to start a timespan that already exists renderApplication_React_render PerformanceLogger: Attempting to end a timespan that has already ended renderApplication_React_render Unbalanced calls start/end for tag 14
Not sure, any help would be awesome!
I update to rn 0.59 without any problem
Are you using this solution? Or your AppDelegate.m looks different? Could you share with us?
Are you using this solution? Or your AppDelegate.m looks different? Could you share with us?
Your issue appears to be different, have you made sure to re-follow the RNN instructions when installing. I'd suggest rm -rf node_modules and then re-linking RNN
Closing as this seems to be a none issue, Thanks @retyui for taking the time to help other users ❤️
@harveyconnor @retyui With regards to this, is there any information for 0.59.3? I am having issues not being able to follow the documentation about the AppDelegate.m, where i cannot use react-native-git-upgrade. Which i quite lost in what to do.
@Seamus-melco It should work, I did from a clean install and it works. However there are a bunch of log messages that occur that might put you off, but I've chosen to ignore them for now.
Have the same warning - Unable to define method 'getConstants()' on NativeModule 'RNNBridgeModule'. Have somebody decision for these ?

I get the warning PerformanceLogger: Attempting to start a timespan that already exists renderApplication_React_render too. And also a slight delay in rendering. Is that known?
@Alekseyideas @pontusab I get both of those logs and my console is full of them when I launch the app.
same message on both Android and iOS:
on Android:
'PerformanceLogger: Attempting to start a timespan that already exists ', 'renderApplication_React_render'
'PerformanceLogger: Attempting to end a timespan that has already ended ', 'renderApplication_React_render'
on iOS:
[info][tid:com.facebook.react.JavaScript] 'PerformanceLogger: Attempting to start a timespan that already exists ', 'renderApplication_React_render'
[info][tid:com.facebook.react.JavaScript] 'PerformanceLogger: Attempting to end a timespan that has already ended ', 'renderApplication_React_render'
Same for me
I have the same problem in combination with react-native-image-crop-picker
Same problem on Android
Same problem on Android
@guyca is there any status on fixing this?
I am having the same issue as well. New project using RN v 0.59.6. I get the error both on iOS and Android.
I copied
AppDelegate.h
and
AppDelegate.m
referenced by @retyui above to make sure there were no typo's.
Versions :
"dependencies": {
"react": "16.8.6",
"react-native": "^0.59.6",
"react-native-navigation": "^2.17.0"
}, ...
OS: macOS Mojave
Can anyone using RN v0.59.x and NOT having this problem, respond to this issue and let us know what version of react-native-navigation you are using?
Thanks.