美文网首页
Mac平台Xcode工程Fastlane配置SOP

Mac平台Xcode工程Fastlane配置SOP

作者: 松鼠君的尾巴 | 来源:发表于2020-04-18 11:36 被阅读0次

1、安装
sudo gem install fastlane -NV
2、判断安装是否成功过以及版本
fastlane --version
3、切换到项目目录
4、安装到项目
fastlane init

->遇到问题:
bundle update 卡住
ruby源可能被墙
~ gem source -l
->更新源

5、安装蒲公英插件
fastlane add_plugin pgyer
蒲公英有官方文档

6、在项目目录找打Fastlane文件夹,编辑Fastfile,写自己的lane
e.g.
打包到蒲公英
desc "打包到pgy"
lane :test do |options|
gym(
clean:true, #打包前clean项目
export_method: "ad-hoc", #导出方式
scheme:"BasisProject", #scheme
configuration: "Release",#环境
output_directory:"~/Desktop/app",#ipa的存放目录
output_name:"BasisProject_"+get_build_number()#输出ipa的文件名为当前的build号
)

蒲公英的配置 替换为自己的api_key和user_key

pgyer(api_key: "XXXXXXXXX", user_key: "XXXXXXXX",update_description: options[:desc],install_type:"2",password:"XXXXXX")
end

7、运行命令
fastlane test

->遇到问题
命令行报错
tool 'xcodebuild' requires Xcode, but active developer directory
Xcode目录或需重置,命令
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

相关文章

网友评论

      本文标题:Mac平台Xcode工程Fastlane配置SOP

      本文链接:https://www.haomeiwen.com/subject/bkvmvhtx.html