我无法找到有关如何将应用程序捆绑和部署到实际设备的最新版本 React-Native 的文档。
在我的 iPhone 上打开远程调试器时出现红屏错误,但应用程序加载时未启用远程调试器。
我没有更改 AppDelegate.m
中的任何 url,rootBundle 仍然是 @"index.ios"
。
最佳答案
感谢 Monochrome 的回答,很有帮助!
我从第 4 步开始就遇到了问题,我的 AppDelegate.m 文件看起来与您解释的不一样。
jsCodeLocation = [[RCTBundleURLProvider sharedSettings]
jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"Kompas"
initialProperties:nil
launchOptions:launchOptions];
关于javascript - 如何在真实设备上捆绑和部署 React-Native iOS 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38507444/