【发布时间】:2019-03-27 09:39:27
【问题描述】:
我已经在 XCode 上的 React Native 项目中设置了代码推送。
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
jsCodeLocation = [CodePush bundleURL];
#endif
现在我想生成jsbundle并在IOS设备上构建项目。
但是我发现jsCodeLocation是重复的。
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
#else
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
我很困惑如何结合 jsCodeLocation ?
我不熟悉 Objective-c。
【问题讨论】:
标签: objective-c xcode react-native