问题描述
使用 Xcode 7.3 时,我在 iOS 模拟器上运行时出现未提供脚本 URL"?
我关注了
通常在iOS模拟器上运行运行良好.我错过了什么?
我的目标是评估 UIExplorer 中的 NavigatorExperimental,以便在 iOS 和 Android 上使用.
其他示例,例如/Examples/Movies/运行良好.
提前致谢,
这个最近的变化破坏了 UIExplorer 的运行:
https://github.com/facebook/react-native/commit/913b4ccee4190565cee4190565cee4198045c55aae/a>
解决方法是在 AppDelegate.m 中注释掉以下几行.
注释掉阻止它设置 sourceURL = nil
//if (!getenv("CI_USE_PACKAGER")) {//sourceURL = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];//}
电影示例工作正常.电影示例没有检查 CI_USE_PACKAGER 环境变量的这一行.
Using Xcode 7.3, I get "No script URL provided" running on an iOS simulator?
I followed UIExplorer README.md
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Open Examples/UIExplorer/UIExplorer.xcodeproj in Xcode
Hit the Run button
Usually running on iOS simulator runs well. What am I missing?
My goal is to evaluate NavigatorExperimental in UIExplorer for use on both iOS and Android.
Other examples such as /Examples/Movies/ run fine.
Thanks in advance,
This recent change broke running of UIExplorer:
https://github.com/facebook/react-native/commit/913b4ccee492780ae180657094c261805455deea
Work-around is to comment-out the following lines in AppDelegate.m.
Commenting-out prevents it from setting the sourceURL = nil
// if (!getenv("CI_USE_PACKAGER")) {
// sourceURL = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
// }
The Movies example works fine. The Movies example does not have this line checking for CI_USE_PACKAGER environment variable.
这篇关于react-native UIExplorer 不会在 iOS 模拟器中运行?(红框“未提供脚本 URL")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!