【FAQ】exportArchive: No applicable devices found.

【问题描述】

开发在一次合并之后,能正常打包的 iOS app 突然罢工了,xcodebuild archive 正常,可是 export archive 的时候就报错,提示:No applicable devices found.

详细报错如下:

** ARCHIVE SUCCEEDED **

2017-02-15 17:30:42.235 xcodebuild[40487:12742675] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/pc/gsn5_b390x7b6xdf1cgltcr80000gn/T/Uplus_2017-02-15_17-30-42.234.xcdistributionlogs'.
2017-02-15 17:30:56.853 xcodebuild[40487:12742675] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fd80ef102b0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

** EXPORT FAILED **

【出错分析】

之前碰到过 xcodebuild build 的时候,报 “No applicable devices found” 的错误,加了参数 -destination generic/platform=iOS 就好了。这次试了不行;

网上说的 ruby 版本的解释,也行不通;

后来想查 git log, 发现这次合并的东西实在太多了,也不好检查。

最后仔细看了看出错的日志,其中有一个日志路径,就进去看了看:

Created bundle at path'/var/folders/pc/xxx/T/xx_2017-02-15_17-30-42.234.xcdistributionlogs'.

这个目录下有四个文件:

IDECodesignResolver.log       IDEDistribution.critical.log  IDEDistribution.standard.log  IDEDistribution.verbose.log

默认打包 console output 输出的是 IDEDistribution.critical.log,检查了一下 IDEDistribution.standard.log,才恍然大悟:

        error: Info.plist of “xxx.app/H5PresetResource.bundle/Contents” specifies a non-existent file for the CFBundleExecutable key

【解决方法】

这下就好办了,找到这个文件,把这个 key 删除就好了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值