【问题标题】:React-Native iOS App Build Failure - Print: Entry, ":CFBundleIdentifier", Does Not ExistReact-Native iOS 应用程序构建失败 - 打印:条目,“:CFBundleIdentifier”,不存在
【发布时间】:2016-08-07 05:46:37
【问题描述】:

我正在本地 Mac OS X El Capitan 机器上运行 react-native 应用程序。我已经安装了所需的依赖项,但应用程序仍然没有在 iOS 模拟器中启动。

这是输出:

** BUILD FAILED **


The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/F8v2.app/F8v2 normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/F8v2.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/done.js:10
      throw err;
      ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/F8v2.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:464:13)
    at Object.execFileSync (child_process.js:484:13)
    at _runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:82:32)
    at /Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5
    at tryCallTwo (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:200:13)
    at new Promise (/Users/-/f8app/node_modules/react-native/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (/Users/-/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
    at Object.run (/Users/-/f8app/node_modules/react-native/local-cli/cliEntry.js:96:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)

【问题讨论】:

  • 您是否尝试过清理和重建您的项目?你运行cd ios &amp;&amp; pod install 并打开 .xcworkspace 文件了吗?
  • 这里讨论了同样的问题,关于如何修复有多种不同的想法:github.com/facebook/react-native/issues/7308 - 对我有用的是运行react-native upgrade 以获取最新的 pbxproject 文件更改。

标签: react-native


【解决方案1】:

运行 react-native upgrade 并覆盖所有 iOS 文件。那是为我做的。

【讨论】:

  • 唯一解决它的解决方案是分散在互联网上的所有问题
  • 如果我不想更改 react-native 版本怎么办?有没有其他办法?
【解决方案2】:

对我来说,问题是build/info.plist 的目录路径中有一个空格。 删除父文件夹名称中的空格即可解决。

【讨论】:

    猜你喜欢
    • 2016-09-24
    • 2018-02-09
    • 2019-02-27
    • 2017-09-09
    • 2019-06-06
    • 2019-08-16
    • 2019-10-28
    • 2018-06-05
    • 1970-01-01
    相关资源
    最近更新 更多