【发布时间】:2019-01-06 03:23:32
【问题描述】:
注意:请务必评论我应该提到什么来改进这个问题,而不是大拇指向下,我能够成功地为另一个项目设置带有 expo 的 React Navigation,并且会喜欢在这个项目中启动并运行 RNN。
我正在为我的 React Native 应用程序设置 React Native Navigation,特别是使用 Xcode 的 iOS。
我已按照说明更改了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
进行更改后,我收到两个 Xcode 错误:
'ReactNativeNavigation/ReactNativeNavigation.h' file not found
Use of undeclared identifier 'ReactNativeNavigation'
我已确保遵循所有步骤,错误发生在React Native Navigation iOS documentation 的第 3 步中
【问题讨论】:
-
也不理解反对票,所以我赞成 ;-)
标签: ios react-native react-native-navigation