Fastlane 实现xcode 打ipa包并上传到蒲公英

 

总述:需要的安装的插件:(通过终端安装) :fastlane,Xcode 命令行工具,pgyer;

步骤:

1:安装fastlane

1)首先要安装正确的 Ruby 版本,在终端窗口中用下列命令来确认:

ruby -v
终端反应:
macdeMacBook-Air:Desktop mac$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]

2)然后检查 Xcode 命令行工具是否安装。在终端窗口中输入命令:

xcode-select --install
如果未安装,终端会开始安装,如果报错误:command line tools are already installed, use "Software Update" to install updates.代表已经安装。
终端反应:
macdeMacBook-Air:Desktop mac$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

 

3)以上依赖配置好之后就可以通过 rubygem 进行安装了:

$ sudo gem install fastlane
Password:  //输入电脑密码
Fetching: slack-notifier-2.3.2.gem (100%)
Successfully installed slack-notifier-2.3.2
Fetching: rouge-2.0.7.gem (100%)
Successfully installed rouge-2.0.7
Fetching: xcpretty-0.3.0.gem (100%)
...
...
...
...  //安装很多东西
53 gems installed
$ 

如果安装出现以下错误:

$ sudo gem install fastlane
Password:
ERROR:  SSL verification error at depth 1: self signed certificate in certificate chain (19)
ERROR:  Root certificate is not trusted (/CN=PH01.COM)
ERROR:  SSL verification error at depth 1: self signed certificate in certificate chain (19)
ERROR:  Root certificate is not trusted (/CN=PH01.COM)
ERROR:  SSL verification error at depth 1: self signed certificate in certificate chain (19)
ERROR:  Root certificate is not trusted (/CN=PH01.COM)
ERROR:  Could not find a valid gem 'fastlane' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/specs.4.8.gz)

出现这个问题的原因主要是Ruby环境需要2.2版本以上,所以要更新Ruby环境。

更新Ruby环境

0.首先要安装Homebrew终端输入这条命令即可/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
1.安装rvm$ curl -L get.rvm.io | bash -s stable
2.装载rvm$ source ~/.rvm/scripts/rvm
3.安装2.3.0版本ruby$ rvm install 2.3.0
4.将2.3.0设为默认$ rvm use 2.3.0 --default

更新完之后再执行sudo gem install fastlane 安装就可以安装成功了

 

 

2、登录蒲公英 - > 选择文档选项 - > 选择下图中标红选项 -> 安装上传到蒲公英的插件

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值