从Xcode7†开始,Xcode7导出归档步骤给我们带来了错误。
Build命令
xcodebuild -exportArchive -archivePath "path/to/Thing.xcarchive" \
-exportPath "path/to/" \
-exportOptionsPlist path/to/PackageOptions-adhoc.plist
收益率
2015-10-08 16:28:27.409 xcodebuild[62682:464728] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7ff1a42d23f0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7ff1a72ddd80 {NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7ff1a72ddd80 {NSLocalizedDescription=No applicable devices found.}
** EXPORT FAILED **
怎么回事?如何修复?
小牛上的†7.0和7.0.1。
发布于 2015-10-09 22:42:15
在我们的例子中,这与我们通过rvm使用非系统ruby有冲突。要修复此问题,您需要在rvm use system
的上下文中调用xcodebuild
。但是要做到这一点很复杂,因为在脚本中使用rvm
比正常情况下更难。
我们创建了一个脚本,它为我们修复了这个问题:
#!/bin/bash --login
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
rvm use system
xcodebuild "$@"
这是xcodebuild的临时替代品,其中
xcodebuild arg1 ... argn
会变成
path/to/xcbuild-safe.sh arg1 ... argn
我已经gisted了一个可以投入生产的版本。确保你在那个文件上使用了chmod +x
。
发布于 2015-11-11 00:53:26
因此,正如Clay Bridges所暗示的那样,潜在的问题是Ruby中发生了一个错误。具体地说,此错误是由使用过期版本的CFPropertyList gem引起的。
你可以简单的更新这个gem来解决这个问题。xcodebuild
使用系统ruby,所以只需这样做:
/usr/bin/gem install CFPropertyList
发布于 2017-06-15 14:56:52
确保使用系统ruby构建xcodebuild。
我通过这样做解决了这个问题:
rvm use system
https://stackoverflow.com/questions/33041109
复制相似问题