一、安裝Fastlane
sudo gem install fastlane -NV或是brew cask install fastlane
二、初始化Fastlane
cd到你的項目目錄執(zhí)行
fastlane init
三自動管理證書
fastlane match init
git_url("https://gitee.com/xxxx/xxxxxxx.git") //新建一個項目,將地址復制到這里
type("development") # 默認match所同步的類型,可不管
app_identifier("bundle Id")? #bundleId,若同工程下有多個,則用["bundleId1","bundleId2"]
username("user@fastlane.tools")? #蘋果開發(fā)者賬號
配置好后,在主項目工程目錄下執(zhí)行:
fastlane match development --verbose
default_platform(:ios)
platform :ios do
? desc "Description of what the lane does"
? lane :custom_lane do
? ? # add actions here: https://docs.fastlane.tools/actions
? end
? lane :dis do
? xcode_select("/Applications/Xcode.app")
? ? ? build_app(
? ? ? ? scheme: "Japanese",
? ? ? ? export_method: "app-store",
? ? ? ? output_name: "app-store.ipa",
? ? ? ? export_xcargs: "-allowProvisioningUpdates"? ?
? ? ? )
? end?
? lane :dev do
? xcode_select("/Applications/Xcode.app")
? ? ? build_app(
? ? ? ? scheme: "Japanese",
? ? ? ? export_method: "development",
? ? ? ? output_name: "dev.ipa",
? ? ? ? export_xcargs: "-allowProvisioningUpdates"
? ? ? )
? end
? lane :hoc do
? xcode_select("/Applications/Xcode.app")
? ? ? build_app(
? ? ? ? scheme: "Japanese",
? ? ? ? export_method: "ad-hoc",
? ? ? ? output_name: "hoc.ipa",
? ? ? ? export_xcargs: "-allowProvisioningUpdates"
? ? ? )
? end?
end