Provisioning Profile 自動化更新

教學連結

Sigh

fastlane sigh \
--force \
--cert_id $CERT_ID \  # You can get cert_id by Spaceshipe
--username $APPLE_ID \
--provision_name Sample_${PROVISION_VALID_YEAR}_InHouse \
--app_identifier tw.com.cathaylife.SampleAppForCI \
--team_id $DEV_PORTAL_TEAM_ID \
--filename Sample_${PROVISION_VALID_YEAR}_InHouse.mobileprovision
  • 注意:在套用新的Cert產生安裝描述檔之前,舊的Cert先不要從Keychain移除,否則fastlane會判別為不同的檔案,進而另外建立一個後面有流水編號且同名的安裝描述檔。等所有安裝描述檔建立完後再移除舊的Cert即可,記得要移除,否則Xcode吃不到新的Cert。

cert_id

require 'spaceship'
Spaceship.login('your@appleid') 
Spaceship.client.team_id='your team id'

Spaceship.certificate.in_house.all.each do |cert|
    puts cert.id
    puts cert.expires
end

envirornment variable

Set environment variables on ~/.bash_profile file and it will always valid when terminal launches.

  • set

export APPLE_ID=ggyy@gmail.com
  • show variables

printenv
  • show some variable

printenv APPLE_ID
or
echo ${APPLE_ID}

ProvisionQL

brew cask install provisionql

Last updated