打印:条目,“:CFBundleIdentifier",不存在 [英] Print: Entry, ":CFBundleIdentifier", Does Not Exist
问题描述
当我运行 react-native run-ios
时,构建成功,但出现以下错误.我已经检查了所有地方,但似乎没有任何效果.在命令前使用 sudo
也无济于事.我使用的是 Xcode 7.3,react-native-cli:0.2.0,react-native:0.24.1,node v5.11.0.
When I run react-native run-ios
the build succeeds but I get the error below. I've checked all over the place but nothing seems to be working. Using sudo
in front of the command does not help either. I am using Xcode 7.3, react-native-cli: 0.2.0, react-native: 0.24.1, node 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)
推荐答案
在 Xcode 中打开项目
Open Project in Xcode
如果 Xcode >9运行命令 react-native upgrade
(这会覆盖你所有的 iOS 配置,谨慎使用!)
If Xcode > 9
run command react-native upgrade
(this overwrites all your iOS configurations, use with caution!)
然后
1.转到文件 ->项目设置
1.Go to File -> Project settings
2.点击高级按钮
3.选择自定义"并选择相对于工作区"在下拉
3.Select "Custom" and select "Relative to Workspace" in the pull down
4.更改构建/产品"到构建/构建/产品"和构建/中间体"到构建/构建/中间体"
4.Change "Build/Products" to "build/Build/Products" and "Build/Intermediates" to "build/Build/Intermediates"
5.点击完成,完成
这篇关于打印:条目,“:CFBundleIdentifier",不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!