xcode - 在模拟器中安装应用程序时,Simctl install 无法在 .app 中找到 Bundle Identifier

标签 xcode ios-simulator xcrun cfbundleidentifier simctl

当我尝试在启动的模拟器中安装我的应用程序时,如下所示:

xcrun simctl install booted /build/iphone/build/Debug-iphonesimulator/foo.app

我得到以下结果:

An error was encountered processing the command (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.

当我检查 .app 内的 Info.plist 时,CFBundleIdentiefier 就在那里并且正确。

<key>CFBundleIdentifier</key>
    <string>com.bar.foo</string>

我在 Yosemite 上使用 xcode 6.3.2

模拟器在安装时启动。

我做错了什么?

最佳答案

一切都是错误的道路:

xcrun simctl install booted /build/iphone/build/Debug-iphonesimulator/foo.app

第一个正斜杠不应该在那里......就这么简单:

xcrun simctl install booted build/iphone/build/Debug-iphonesimulator/foo.app

关于xcode - 在模拟器中安装应用程序时,Simctl install 无法在 .app 中找到 Bundle Identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30911904/

相关文章:

ios - Xcrun 没有嵌入传递的配置文件

xcode - 如何为所有模拟器启用/禁用 “Show as run destination”

ios - (在iOS/OS X SDK中)__i386__和__x86_64__在哪里定义?

ios - 如何使用 xcrun 选择要自动上传的应用程序?

iOS 单元测试 : Class is implemented in both

debugging - Xcode 7.3 不会附加到模拟器进行调试

ios - 允许通过 xcrum simctl openurl 命令将大于 2000 个字符的字符串传递到 iOS 应用程序

xcode - 如何在 Mac 上编译/构建 Ada?

objective-c - 我如何检查 ALAsset 是一个图像。我如何从 ALAssetGroup 中分离图像(.png)文件

Xcode/Git 存储库错误 : "Please verify that the working copy is reachable and try again."