- 没有安装fastlane则需要先执行
$sudo gem install fastlane
2.在git上创建一个私有仓库,用来存放证书.
3.创建好之后git clone下来,在项目目录下执行
$fastlane match init
创建match文件,并在git repo处输入私有仓库地址。
4删除旧的证书:
$ fastlane match nuke development
$ fastlane match nuke distribution
5.都创建好之后执行以下几句命令
$ fastlane match development
$ fastlane match adhoc
$ fastlane match appstore
6.添加新的device:
1, sudo fastlane run register_device name:"test" udid:"000000000000000000000000000000"
2, sudo fastlane match <development|adhoc|appstore> --force_for_new_devices
sudo fastlane match development --force_for_new_devices --git_branch longniu
sudo fastlane match adhoc --force_for_new_devices --git_branch longniu
sudo fastlane match appstore --force_for_new_devices --git_branch longniu
7.新人入职需要git clone下来文件,然后执行
$ fastlane match development --readonly --git_branch longniu --readonly
$ fastlane match adhoc --readonly --git_branch longniu --readonly
$ fastlane match appstore --readonly --git_branch longniu --readonly
如果以上不可以的话就带上分支执行
fastlane match development --git_branch longniu --readonly
推荐去看看fastlane match的文档,里面还有很多功能,比如支持多个team,多个target,device file文件的管理等等。
Reference
1, https://codesigning.guide
2, http://www.macadamian.com/2017/09/26/automating-ios-certificate-and-profile-syncing-with-fastlane/
3, https://docs.fastlane.tools/actions/match/#nuke