Reputation: 1
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:
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:
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
Upvotes: 0
Views: 2218
Reputation: 5451
setRoot({stack})
instead of startSingleScreenApp(params)
You are using a react-native-navigation version 2. check the API changelog
Upvotes: 4