升级到 RN 0.29.1 后,我的 AppDelegate.m 文件中没有可以显示 dev=false 的 URL...是否有一种明显的方法可以关闭我缺少的开发模式?
最佳答案
Facebook 似乎没有更新有关如何使用新 RCTBundleURLProvider
的文档。现在,我刚刚添加回以前版本中的旧 URLWithString
,它工作得很好:
添加:
jsCodeLocation = [NSURL URLWithString:@"http://ipaddress:8081/index.ios.bundle?platform=ios&dev=true"];
评论:
[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
关于react-native - iOS 中没有开发模式的 React Native 0.29+?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38405888/