在使用React Native最新版0.46.1的时候发现了问题:
Failed to install the requested applicationAn application bundle was not found at the provided path.Provide a valid path to the desired application bundle.Print: Entry, ":CFBundleIdentifier", Does Not ExistCommand failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ReactNativexx.app/Info.plistPrint: Entry, ":CFBundleIdentifier", Does Not Exist
使用各种方法都没有解决
比如react-native upgrade
后面终于找到了原因
node_modules/react-native/ios-install-third-party.sh执行结果不正确,可能是网络原因。
手动下载
https://github.com/google/glog/archive/v0.3.4.tar.gz
https://github.com/google/double-conversion/archive/v1.1.5.tar.gz
https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz
https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz
1.放进 ~/.rncache/.
2.解压到node_modules/react-native/third-party/
在xcode中运行,会发现报错,缺少glob config.h
1.进入终端cd node_modules/react-native/third-party/glog-0.3.4
2.运行../../scripts/ios-configure-glog.sh
会发现脚本帮忙生成了很多东西,包括config.h
再次在Xcode运行,就成功了。