fastlane

安裝 fastlane

fastlane tools 使用說明
brew cask install fastlane
或者
sudo gem install fastlane -NV
但是上面兩種安裝方法,都沒有安裝其他附屬的tools 比如(produce,deliver等)
第三種方法是直接手動下載解壓到本地,然后雙擊install script,同時包含uninstall script

卸載

  • sudo gem uninstall fastlane
  • rm -rf ~/.frameit

APP 信息

如果不手動配置,fastlane init的時候會自動幫你初始化, 比如SKU(App的專有ID,一旦創(chuàng)建就不能修改了)
你也可以通過 produce 自己配置,詳細命令可以查看produce
參考如下:

produce create -u 用戶名 -a Bundle_ID -q 'App_name' --sku 'sku嗎' -z '版本號' -m '支持語言' -d

插件 plugins

fastlane 支持很多插件,比如我使用的 firim,fastlane add_plugin firim 這一步如果報錯了,接著執(zhí)行bundle install,后期就可以使用gem管理fastlane

Tools使用說明actions

也可以在終端使用命令 fastlane action [action_name] 比如查看gym fastlane action gym
fastlane list 查看 available lanes

使用match自動創(chuàng)建打包證書和profile文件

fastlane match init 創(chuàng)建 Matchfile文件 , init的時候會讓你輸入一個存儲證書
和profile文件的git地址,然后會在Matchfile里面生成配置信息

例如
git_url "git地址"
type "appstore" # The default type, can be: appstore, adhoc, enterprise or development
app_identifier ["你的bundleID"]
username "登錄iTunes賬號" # Your Apple Developer Portal username

match 還有個nuke的方法 fastlane match nuke development,刪除develop環(huán)境下的證書和profile,同時刪除了對應的git地址上的證書和profile,如果是distribution環(huán)境使用fastlane match nuke distribution,刪除證書不會影響AppStore上的應用,不過TestFlight上面的會受到影響,可以從新打包上傳
配置一下Matchfile文件,執(zhí)行fastlane match會從新生成證書和profile文件
更多match的使用方法可以參考 match doc

git

fastlane支持git操作,可以先執(zhí)行git_pull操作,然后gym打包,具體參考source-control

Deliver

  • deliver 可以配置適合人群(Available age rating groups)
  • 支持的語言(Available Languages)
  • submit_for_review 判斷當上傳metadata/binary后,是否自動submit review ,如果為true,則需要配置下一步的信息
  • submission_information配置是否使用idfa那坨東西

更多

更高級的用法請參考advance

參考配置

lane :debug do
    build_no = get_version_number + '.' + Time.new.strftime("%m%d%H%M")
    increment_build_number(build_number: build_no)
    match(type: "development")
    gym(scheme: "xxx",
        workspace: "xxx.xcworkspace",
        output_directory: "./build/",
        clean: true,
        configuration: "Debug",
        output_name: "xxx") # Build your app - more options available
    firim(firim_api_token: "fir token")
    sh ".././sendmail.sh" # 發(fā)送郵件的腳本
  end

參考文章

https://fastlane.tools/
https://github.com/fastlane/fastlane

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容