iOS fastlane打包上传蒲公英

1、安装 Xcode command line tools:

 xcode-select —install

2、安装fastlane

 brew install fastlane

检查一下是否安装成功

fastlane --version

3、fastlane 初始化

首先需要cd到你的工程目录
然后执行以下代码

fastlane init

在这里插入图片描述

4、初始化选项

我选择是第4项
一直按Enter。

5、fastfile 文件配置

default_platform(:ios)

platform :ios do
  desc "Description of what the lane does"
  lane :custom_lane do
    time = Time.new.strftime("%Y%m%d") #获取时间格式
    version = get_version_number#获取版本号
    ipaName = "Release_#{version}_#{time}.ipa"# 输出后的ipa的名字
    
  	gym(
       scheme:"#####", #项目名称
       export_method:"ad-hoc",#打包的类型
       configuration:"Release",#模式,默认Release,还有Debug
       output_name:"#{ipaName}",#输出的包名
       output_directory:"~/Desktop"#输出的位置
	
     )
    api_key = "#####"
 	user_key = "#####"
 	pgyer(api_key:"#{api_key}",user_key:"#{user_key}")
  end
end

6、安装蒲公英的 Fastlane 插件

fastlane add_plugin pgyer

7、打包上传到蒲公英

fastlane custom_lane

在这里插入图片描述

8、中间出现的问题

在上传的过程中出现以下错误:
Your real-name authentication information has not been face authentication yet, please authenticate now
翻译如下:
您的实名认证信息尚未进行正面认证,请立即进行认证
在蒲公英实名认证下就可以了。
再次执行

fastlane custom_lane

就可以了。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值