fastlane 集成

2018-08-16  本文已影响15人  九月_adhoc

安装

使用 gem 安装 fastlane

 sudo gem install fastlane

确保 Xcode 命令行工具已安装:

xcode-select --install

进入工程目录

fastlane init

编写Fastfile文件

default_platform(:ios)

_now = Time.now.strftime("%Y%m%d.%H%M%S")
print("\n 如果找不到\n 先到xcode点一下")

platform :ios do
   desc "Description of what the lane does"
   lane :adhoc do
    increment_build_number(build_number: _now)
    gym(
         export_method:"ad-hoc",
         output_directory:"./build",
         silent:true
         #archive_path:"./Archive"         
       )
    firim(
    firim_api_token: "1d3a1e7e810391dba61b99af89be7e72",
    app_desc: _now,
  )
  end
  lane :fabu do
    firim(
     platform:"ios",
     firim_api_token: "1d3a1e7e810391dba61b99af89be7e72",
     app_desc:_now,
     ipa:"./build/xxx.ipa"
     )
  end
  
end

自动证书管理

初始化

fastlane match init

新建git仓库

运行

fastlane match development
fastlane match adhoc
fastlane match appstore
fastlane match enterprise

其他人取证书

fastlane match development --readonly

增加udid

fastlane match development --force_for_new_devices

mobileprofile 路径

open ~/Library/MobileDevice/Provisioning\ Profiles

插件管理

列出所有可用插件

fastlane search_plugins

搜索指定名称的插件:

fastlane search_plugins [query]

添加插件:

fastlane add_plugin [name]

安装插件:

fastlane install_plugins
上一篇下一篇

猜你喜欢

热点阅读