fastlane/lib/fastlane/actions/docs/get_certificates
Why? • Usage • How does it work? • Tips
cert is part of fastlane: The easiest way to automate beta deployments and releases for your iOS and Android apps.
In the gif we used cert && sigh
, which will first create an iOS code signing certificate and then a provisioning profile for your app if cert succeeded.
Usage
Note: It is recommended to use match according to the codesigning.guide for generating and maintaining your certificates. Use cert directly only if you want full control over what’s going on and know more about codesigning.
fastlane cert
This will check if any of the available signing certificates is installed on your local machine.
Only if a new certificate needs to be created, cert will
- Create a new private key
- Create a new signing request
- Generate, downloads and installs the certificate
- Import all the generated files into your Keychain
cert will never revoke your existing certificates. If you can’t create any more certificates, cert will raise an exception, which means, you have to revoke one of the existing certificates to make room for a new one.
You can pass your Apple ID:
fastlane cert -u cert@krausefx.com
For a list of available commands run
fastlane action cert
Keep in mind, there is no way for cert to download existing certificates + private keys from the Apple Developer Portal, as the private key never leaves your computer.
Environment Variables
Run fastlane action cert
to get a list of all available environment variables.
Use with sigh
cert becomes really interesting when used in fastlane in combination with sigh.
Update your Fastfile
to contain the following code:
lane :beta do cert sigh(force: true) end
force: true
will make sure to re-generate the provisioning profile on each run.
This will result in sigh always using the correct signing certificate, which is installed on the local machine.
How is my password stored?
cert uses the password manager from fastlane. Take a look the CredentialsManager README for more information.
Tips
Use ‘ProvisionQL’ for advanced Quick Look in Finder
Install ProvisionQL.
It will show you mobileprovision
files like this: