1. 程式人生 > >自動化打包之fastlane--(5) 自動打包到蒲公英

自動化打包之fastlane--(5) 自動打包到蒲公英

1.fastlane init首先需要完成

cd 到當前專案

這裡寫圖片描述

2. fastlane新增蒲公英外掛

bundle exec fastlane add_plugin pgyer

這裡寫圖片描述

3. Fastfile增加上傳到蒲公英的lane

新增api_key和user_key

注意:

  • 以上的 api_key 和 user_key,請開發者在自己賬號下的 應用管理 - App概述 - API 中可以找到,並替換到以上相應的位置。
  • 在 Xcode 8.3 和 Xcode 8.3 以後的版本中,對於 build_app 的 export_method 的值,需要根據開發者的打包型別進行設定,可選的值有:app-store、ad-hoc、development、enterprise。對於 Xcode 8.3 以下的版本,則不需要設定 export_method。

這裡寫圖片描述

lane :beta do
    build_app(export_method: "ad-hoc")
    pgyer(api_key: "8733a21b33abd8d00f20xxxxxx744", user_key: "f22dd2ae3e4b138c4dxxxxxxxxcec")
  end

4. 執行fastlane beta

這裡寫圖片描述

上傳成功提示

這裡寫圖片描述

5.登入蒲公英平臺檢視結果

這裡寫圖片描述