首页 > 解决方案 > 在为 iOS 构建我的 NativeScript 应用程序时,我没有设置 CFBundleIdentifier

问题描述

项目建设成功。构建结果位于:/Volumes/projects/nativescript/bingoplus/platforms/ios/build/Debug-iphonesimulator/bingoplus.app 在设备上安装 BF118DE4-9A73-459B-A223-D5CB324F19AF... 无法在设备上应用更改:BF118DE4-9A73-459B-A223-D5CB324F19AF。错误是:带有参数的命令 xcrun simctl install BF118DE4-9A73-459B-A223-D5CB324F19AF /Volumes/projects/nativescript/bingoplus/platforms/ios/build/Debug-iphonesimulator/bingoplus.app 失败,退出代码为 22。错误输出:An处理命令时遇到错误(域=NSPOSIXErrorDomain,代码=22):无法安装请求的应用程序无法确定应用程序的捆绑标识符。确保应用程序的 Info.plist 包含 CFBundleIdentifier 的值。

看到我将条目添加到 Info.plist 但在重建时我得到了:

[警告]:“Info.plist”中的 CFBundleIdentifier 键将被“package.json”中的“id”覆盖。

然后上面的相同错误“无法确定应用程序的捆绑标识符。确保应用程序的 Info.plist 包含 CFBundleIdentifier 的值。”

package.json 片段:

{


 "nativescript": {
    "id": "bingo.bingoplus",
    "tns-android": {
      "version": "6.0.0"
    },
    "tns-ios": {
      "version": "6.0.1"
    }

标签: nativescript

解决方案


原来这是一个错误。将 tns-core-modules 升级到 6.0.4

https://github.com/NativeScript/nativescript-cli/issues/5073


推荐阅读