![](/img/trans.png)
[英]Building iOS app using Xcode works, but building the same app with xcodebuild command fails
[英]xcodebuild command fails building for device since upgrade to Xcode 6.1
盡管可以在沒有相同設置的情況下構建XCode
但我無法為該設備構建項目。
這是構建命令:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /path/to/workspace/myProject.xcworkspace -scheme myScheme -configuration Debug -destination id=myDeviceIdentifier build
這是我得到的錯誤:
xcodebuild: error: The run destination [device name] is not valid for Running the scheme 'myScheme'.
[device name] doesn't match any of myProject.app's targeted device families. You can expand myProject.app's targeted device families to support [device name].
我確實檢查了該項目和所有子項目的目標設備系列,這很好。
從項目中刪除大量文件引用后,該問題出現的頻率就會降低。
你們中的某些人是否遇到過同樣的問題,您知道如何解決嗎?
盡管我正在為iPad開發,但我可以通過調試為通用應用程序來繞過此問題。
這會將TARGETED_DEVICE_FAMILY
從2
(iPad)更改為項目文件( project.pbxproj
)中的"1,2"
(通用 ) 。
還有一種很簡單的方法可以重現該問題:
如果您從模板創建兩個項目。 一個會工作,一個不會。
作品:Single View App,Objective C,通用不起作用:Single View App,Objective C,iPad
更多信息可以在這里找到:
請向蘋果提交此問題: http : //bugreport.apple.com
請嘗試以下步驟:
通過啟用大量調試輸出,可能還有另一種解決方法。
在命令中添加以下參數:
xcodebuild …
-IDERunDestinationLogLevel=3
如果設置了日志級別3,則建築物可以正常工作。 日志級別為2則不會。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.