失败!! 待后续更新
1.终端显示 bogon,怀疑找不到主机名造成.修改hosts文件映射,不成功.
2.可能Bridge存在bug,替换如下,成功reload.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
NSURL* jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
[[RCTBundleURLProvider sharedSettings] setJsLocation:jsCodeLocation.host];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"bookmanager"
initialProperties:nil
launchOptions:launchOptions];
// RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
// moduleName:@"bookmanager"
// initialProperties:nil];
网友评论