`
贝壳水母
  • 浏览: 145774 次
  • 性别: Icon_minigender_1
  • 来自: 广州中低收入人群
社区版块
存档分类
最新评论

Xcode 6.1下使用xcodebuild出错

阅读更多
之前一直使用xcodebuild脚本build包,间中会报错失败,不过重新跑一次就没事了,也没有去研究究竟是什么问题,脚本摘要如下:
xcodebuild -scheme ${TARGET} archive DSTROOT="build"

直到Xcode升级到6.1,实在糊弄不过去了,一直提示:
2014-10-22 12:13:52.185 xcodebuild[5423:204362] [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6604/IDEFoundation/Execution/Schemes/IDEScheme.m:1402
Details:  Scheme <IDEScheme:0x7fc7653a49b0:'MyApp'> was asked to build and archive, but the run destination <IDERunDestination:0x7fc7653eca60:'iPad 2'> is not a deployment platform and this action shouldn't have been allowed.
Object:   <IDEScheme: 0x7fc7653a49b0>
Method:   -archiveOperationWithExecutionContext:onlyBuild:destination:overridingProperties:schemeCommand:buildLog:overridingBuildConfiguration:invocationRecord:name:title:error:actionCallbackBlock:
Thread:   <NSThread: 0x7fc760c2df20>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
xcodebuild: error: Failed to build project MyApp with scheme MyApp.
	Reason: You cannot archive for the iOS Simulator platform.

一开始以为是build setting设错了,修改armv6,armv7之类无效
后来意外发现,iPad2不就是6.1排在第一位的模拟器嘛,看来是6.1之后使用这条命令会默认指定模拟器为目标设备,只能乖乖上developer.apple.com补补课,就是这里了:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

脚本修改为下面这样之后,终于正常了:
xcodebuild -scheme ${TARGET} -destination generic/platform=iOS archive DSTROOT="build"

分享到:
评论
2 楼 mvplinchen888 2015-07-03  
有用 谢谢
1 楼 freecode 2014-11-03  
有用,谢谢

相关推荐

Global site tag (gtag.js) - Google Analytics