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

时间:2015-06-18 09:43:58

标签: xcode ios-simulator xcrun cfbundleidentifier simctl

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

WORDS = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']

# how much words to print out in a table
word_count = 9
# number of words in a row
row_length = 3

words = WORDS[:word_count]
max_word_length = max(len(x) for x in words)

for index, word in enumerate(words):
    word = "{0:>{1}}".format(word, max_word_length + 1)
    if (index + 1) % row_length:
        print word,
    else:
        print word

我得到以下结果:

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

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

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.

我在Yosemite上使用xcode 6.3.2

模拟器在安装时启动。

我做错了什么?

1 个答案:

答案 0 :(得分:3)

一切都是,这是一条错误的道路:

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

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

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