Open
Description
十分感谢你提供的脚本!
我的Xcode版本是8.3和8.3.1
系统版本10.12.1
我从 archive
导出 ipa
包时发生了失败
2017-04-25 14:43:08.553 xcodebuild[31914:2514903] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/gq/mq8734y16zg2x8g_d10bbzvc0000gn/T/HLStore_2017-04-25_14-43-08.552.xcdistributionlogs'.
1.2.840.113635.100.1.61
2017-04-25 14:43:11.630 xcodebuild[31914:2514903] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fc6226e2e60>: 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 **
google 了解决方法是
先运行下面的脚本
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
rvm use system
再导出 ipa包
不过在 *.sh 中rvm use system
时,会出现下面的错误
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
google了很久,这个问题到现在还是很好的解决方法。
只能手动在终端中输入脚本进行打包~
希望能交流解决这个问题
Activity
jkpang commentedon Apr 26, 2017
你的电脑是安装了两个Xcode? 8.3和8.3.1? 导出ipa报错的原因: exportArchive: No applicable devices found 是没有找到合适的设备, 你卸载掉其中一个Xcode看看 @qiubaiying
qiubaiying commentedon Apr 26, 2017
jkpang commentedon Apr 26, 2017
我这边使用完全没问题,你换一台可以打包的Mac看看能否成功, 我也去找找你出现错误的原因 @qiubaiying
jkpang commentedon Apr 26, 2017
错误信息再po多一点, mv: rename /Users/jarvi/Desktop/hysc-IPA/hysc.ipa to /Users/jarvi/Desktop/hysc-IPA/hysc-v1.0.2.ipa: No such file or directory上一句是export success 还是export failure ? 桌面的hysc-IPA文件夹里面有ipa文件吗 @lll1024
jkpang commentedon Apr 26, 2017
看一下这篇博客,和你遇到的问题是一样,进去后拉到文章最后: http://www.jianshu.com/p/722adedaa3bf @qiubaiying
qiubaiying commentedon Apr 26, 2017
我在我的macBook上执行也是出现同样的错误。
能请问你的构建环境吗?
我的 xcodebuild 版本是
简书上的这篇文章也是用
rvm ues system
,但这样做就需要手动在终端输入,无法一次性打包完成。jkpang commentedon Apr 27, 2017
我的 xcodebuild版本是:
1.你自己的MacBook有安装项目对应的签名证书吗?
2.你的开发者账号是哪一种类型?
3.在选择打包方式的时候选择的是以下哪种方式?
如果打包的类型和你的开发者账号类型不匹配,也有可能会失败. @qiubaiying
qiubaiying commentedon Apr 27, 2017
打包的类型和你的开发者账号类型时一致的
我在运行脚本前输入
rvm use system
,就可以一次性打包成功了。我在猜想是不是ruby版本的问题
macOS自带的ruby版本是2.0.0
我用rvm装的ruby是2.4.0
请问你使用的ruby版本是多少呢?
jkpang commentedon Apr 27, 2017
恩恩,很有可能是和ruby的版本有关系,我前几天升级了最新的ruby
现在的版本和你一样
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
终于解决了啊,厉害👍 @qiubaiying
qiubaiying commentedon Apr 27, 2017
惭愧惭愧,在这卡了很久了~
刚刚在进行了测试,在ruby 2.4.0以下的版本都是可以的。
现在已经切换到ruby2.3.3了
我是在重装Cocoapods的时候升级的ruby2.4.0,看来不能随便升级呀~
我建议你可以在脚本中加入将 ipa包 上传到 fir 的脚本命令的选项,这样就可以打包上传一次性解决了~
最后,再次感谢你抽出时间来帮我解决问题。
jkpang commentedon Apr 27, 2017
恩恩,,感觉每次Xcode升级都会带来一系列的坑😂 . ipa包上传fir.im和蒲公英,网上还是有很多资料的,我现在想把ipa直接传到公司自己的服务器,等搞好了我在弄上去
qiubaiying commentedon Apr 27, 2017
😂同感同感~
muyang00 commentedon Apr 28, 2017
必须点个赞呢👍,可是这样打出来的包比原来xcode打的包足足大了7M,请问这是怎么回事
jkpang commentedon Apr 28, 2017
不会吧,,我的项目使用Xcode和脚本打出来的包都是同样大小 @muyang00
muyang00 commentedon May 2, 2017
在使用这个脚本过程中还发现个问题,目前我的ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]

可是在公司账号下选择那个打包方式1,3,4情况下都会失败,都会提示说ruby版本过低;使用企业账号打包时1,2,3,4种情况都会失败。也是说ruby版本过低。
只有2是好的,可以打出IPA包
20 remaining items