fastlane
docs.fastlane.tools
Getting started with fastlane for iOS
Action和Plugin机制
自己感觉如果是单个项目来说使用fastlane来打包要比jenkins要简便一些,最起码配置要简单的多了。
Getting Started
Install the latest Xcode command line tools:
$ xcode-select --install
Install fastlane using
Using RubyGems
$ sudo gem install fastlane -NV
Alternatively using Homebrew
$ brew cask install fastlane
这里我使用的是通过第一种方式安装的
$ sudo gem install fastlane -NV
安装过程需要耐心等待。
安装完成以后
Navigate your terminal to your project's directory and run
$ fastlane init
如果遇到 bundle update 卡住了很久都没有动的话(网络被墙了)。关闭当前终端进程。然后必须保证下面的命令(bundle update fastlane)是在your project's directory执行的。
Navigate your terminal to your project's directory and run
$ bundle update fastlane
Building your app
这里我简单的打一个ipa
1、编辑Appfile文件
app_identifier "com.JingJiRiBao.com" # The bundle identifier of your app
apple_id "299_xh_dbs_apple@xinhuamm.net" # Your Apple email address
team_id "R2U8SE68WE" # Developer Portal Team ID
# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
2、编辑Fastfile文件
lane :beta do
gym(scheme: "JingJiRiBao", # Build your app - more options available
clean:true, # 在构建前先clean
configuration:"Release", # 配置为Release版本
export_method:"enterprise", # export_method默认是"appstore"
)
end
3、执行命令
$ fastlane beta
4、选择操作处理
6、插件安装
$ fastlane add_plugin pgyer 安装pgyer
$ fastlane add_plugin firim 安装firim
$ bundle update fastlane 更新fastlane
$ fastlane env
$ fastlane --version