fastlane

deliversnapshotframeitPEMsighproducecertcodes


cert

Twitter: @KauseFx License Gem

Automatically create and maintain iOS code signing certificates.
This tool was sponsored by AppInstitute.

Get in contact with the developer on Twitter: @KrauseFx


InstallationWhy?UsageHow does it work?TipsNeed help?


cert is part of fastlane: connect all deployment tools into one streamlined workflow.

Installation

sudo gem install cert

Make sure, you have the latest version of the Xcode command line tools installed:

xcode-select --install

Why?

Please check out this guide which shows how to manually create an iOS code signing profile and a provisioning profile using the Apple Developer Portal.

After checking out the guide, take a look how cert and sigh do all that for you.

assets/cert.gif

In the gif I used cert && sigh, which will first create an iOS code signing certificate and then a provisioning profile for your app if cert succeeded.

Like this tool? Be the first to know about updates and new fastlane tools

Usage

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:

cert -u [email protected]

For a list of available commands run

cert --help

Environment Variables

In case you prefer environment variables:

  • CERT_USERNAME
  • CERT_TEAM_ID
  • CERT_KEYCHAIN_PATH The path to a specific Keychain if you don't want to use the default one
  • FASTLANE_TEAM_NAME (the Team Name, e.g. Felix Krause)

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
end

:force 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 does it work?

How is my password stored?

cert uses the password manager from fastlane. Take a look the CredentialsManager README for more information.

Tips

fastlane Toolchain

  • fastlane: Connect all deployment tools into one streamlined workflow
  • deliver: Upload screenshots, metadata and your app to the App Store using a single command
  • snapshot: Automate taking localized screenshots of your iOS app on every device
  • frameit: Quickly put your screenshots into the right device frames
  • PEM: Automatically generate and renew your push notification profiles
  • sigh: Because you would rather spend your time building stuff than fighting provisioning
  • produce: Create new iOS apps on iTunes Connect and Dev Portal using the command line
  • codes: Create promo codes for iOS Apps using the command line
Like this tool? Be the first to know about updates and new fastlane tools

Use the 'Provisioning Quicklook plugin'

Download and install the Provisioning Plugin to easily preview provisioning profile files and certificates.

Need help?

  • If there is a technical problem with cert, submit an issue.
  • I'm available for contract work - drop me an email: [email protected]

License

This project is licensed under the terms of the MIT license. See the LICENSE file.

Contributing

  1. Create an issue to discuss about your idea
  2. Fork it (https://github.com/KrauseFx/cert/fork)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request