注:
请务必评论一下我应该提到什么来改进这个问题,而不是小题大做,我已经成功地为另一个项目建立了与世博会的反应导航,并且希望RNN能够在这个项目中运行。
我正在为我的React Native应用程序设置React Native导航,特别是使用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