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补补课,就是这里了:
[url]https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html[/url]

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值