Skip to content

Latest commit

 

History

History
246 lines (158 loc) · 6.32 KB

fastlane.md

File metadata and controls

246 lines (158 loc) · 6.32 KB

fastlane

ios,android工具集

安装

$ gem install fastlane --verbose

子工具

  • deliver: 上传截图, 元数据, app应用程序到App Store
  • supply: 上传Android app应用程序和元数据到Google Play
  • snapshot: 自动捕获iOS app应用程序本地截图
  • screengrab: 自动捕获Android app应用程序本地截图
  • frameit: 快速截屏并将截屏放入设备中
  • pem: 自动生成和更新推送通知配置文件
  • sigh: 开发证书和描述文件下载
  • produce: 使用命令行在iTunes Connect上创建新的app和开发入口
  • cert: 自动创建和配置iOS代码签名证书
  • spaceship: Ruby 库访问 Apple开发者中心和 iTunes Connect
  • pilot: 最好的方式管理你的TestFlight 测试人员和从终端构建
  • boarding: 最简单的方式邀请你的TestFlight beta测试人员
  • gym: iOS app打包签名自动化工具
  • match: 使用Git同步你的团队证书和配置文件
  • scan: 最简单方式测试你的 iOS 和 Mac apps

fastlane-credentials: 管理用户名密码。

使用

初始化fastlane

自动生成Fastfile Appfile

$ cd [your_project_folder]
$ fastlane init

截屏

初始化:

$ snapshot init

生成SnapfileSnapshotHelper.swift

添加SnapshotHelper.swiftUITest工程,会自动提示添加桥接文件。

模拟启动失败

$ snapshot reset_simulators

上传截图,ipa到 iTunes Connect

初始化:

$ cd [your_project_folder]
$ deliver init

会自动从iTunes Connect下载所有配置到metadatascreenshots,并生成Deliverfile

Deliverfile文档

自动给截屏加上设备边框

安装imagemagick

$ brew install imagemagick

frameit setup

配置frameit,会提示从 https://developer.apple.com/app-store/marketing/guidelines/#images 下载对应的框架并解压到 ~/.frameit/devices_frames,然后制作带边框的截图

frameit

创建太空灰边框的框架,在fastlane目录下运行

frameit silver

创建银色边框的框架,在fastlane目录下运行

自定义title

参考 https://github.com/fastlane/examples/tree/master/MindNode/screenshots

  • title.stringkeyword.string必须是UTF-16 BE编码,并且第一行换行
  • .ttf 字体文件从系统字体册中找
  • 例子中的Framefile.jsonzcmn-Hans改成zh-Hans
  • title为图片名后部分,EG1_ipad_1.11.1

scan 测试

测试并导出错误报告

scan init

生成 fastlane/Scanfile

scan

开始测试

cert 管理证书

cert OR cert create

创建证书

cert revoke_expired

删除过期证书

sigh 管理描述文件

创建刷新描述文件

sigh manage

列出所有描述文件

sigh repair

修复所有失效或者过期的描述文件

sigh download_all

下载并安装所有描述文件

gym 打包

打包

gym init

生成fastlane/Gymfile

gym

开始打包

pilot 管理TestFlight

管理TestFlight.管理测试用户、上传ipa包

上传ipa包

$ pilot upload

pem

创建推送证书

fastlane pem --development -p <your password>

match git管理描述文件

用 git 管理描述文件

Q1

Provisioning profile 'a8950521-d017-410b-a23a-07a8b823922f' is not available on the Developer Portal

删掉管理描述文件 git 上的 profiles 目录。再重新 match

Q2

Certificate 'C76G4T85S7' (stored in your git repo) is not available on the Developer Portal

Q3

Could not create another Distribution certificate, reached the maximum number of available Distribution certificates.

删掉苹果开发者网站上 match_ 开头的描述文件后重新 match

Reference