I'm building a React Native app and using React Native Navigation to move between screens. Something happened, some files were deleted and it seems like my xcode project settings were wiped.
When I boot up my app using 'npm run start' and 'react-native run-ios --simulator="iPhoneX", I get the following errors:
- red error simulator screen that says: _reactNative.Navigation.startSingleScreenApp is not a function
- the terminal window I ran "run-ios" fails and has this error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RNNCustomViewController", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed these instructions: https://wix.github.io/react-native-navigation/#/docs/Installing
versions:
- node: v11.6.0
- npm: 6.5.0
- react-native-cli: 2.0.1
- react-native: 0.55.3
- "react-native-navigation": "^2.2.5"
App.js:
import { Navigation } from 'react-native-navigation';
import AuthScreen from './src/screens/Auth/Auth';
import SequencesList from './src/screens/SequencesList/SequencesList';
Navigation.registerComponent("my-app.AuthScreen", () => AuthScreen);
Navigation.registerComponent("my-app.App", () => App);
Navigation.registerComponent("my-app.SequencesList", () => SequencesList);
Navigation.startSingleScreenApp({
screen: {
screen: "my-app.SequencesList",
title: "Sequences"
}
});
AppDelegate.m
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
return YES;
}
@end
header search path has been set to: $(SRCROOT)/../node_modules/react-native-navigation/lib/ios