【发布时间】:2016-09-24 12:11:33
【问题描述】:
当我运行react-native run-ios 时,构建成功,但出现以下错误。我已经检查了所有地方,但似乎没有任何效果。在命令前使用sudo 也无济于事。我正在使用 Xcode 7.3,react-native-cli:0.2.0,react-native:0.24.1,节点 v5.11.0。
=== BUILD TARGET mobileTests OF PROJECT mobile WITH CONFIGURATION Release ===
Check dependencies
** BUILD SUCCEEDED **
Installing build/Build/Products/Debug-iphonesimulator/mobile.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mobile.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:470:13)
at Object.execFileSync (child_process.js:490:13)
at _runIOS (runIOS.js:91:34)
at runIOS.js:24:5
at tryCallTwo (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/astiefel/workspace/bosspayments/mobile/node_modules/react-native/local-cli/cli.js:86:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
【问题讨论】:
-
文件中是否存在捆绑标识符?我认为不是,所以问题是“为什么不将它写入文件”。
-
这并没有真正的帮助。你能详细说明一下吗?
-
对我来说,这是由于与 Xcode9.4 的 react-native 兼容性问题。我使用以下步骤解决了。 “rm -rf node_modules”然后是“react-native upgrade”然后是“npm install”然后是“react-native run-ios”
-
Raja..您确定可以在删除 node_modules 文件夹后运行 react-native upgrade 吗?我试过了,它说无法识别升级
-
关闭你的终端,再次打开它并运行它为我工作的应用程序。
标签: ios reactjs react-native