Table of Contents
You want to use Fastlane match using an existing certificate. You might want to do this if you don't have permission to manage the certificate, e.g., working on a client project or a project that doesn't fully integrate with Fastlane match.
You have a certificate (.cer) and a private key (.p12), but you still want to benefit from other match features like provisioning profile creation, codesign synchronization, CI, etc.
If you are in this situation, don't lose hope. You can still enjoy the Fastlane match using your old certificate.
You can easily support sarunw.com by checking out this sponsor.
Turn your code into a snapshot: Codeshot creates a beautiful image of your code snippets. Perfect size for Twitter.
Fastlane match has an import function where you can import a certificate (.cer), the private key (.p12), and the provisioning profiles (.mobileprovision or .provisionprofile) into the match repository. In this article, I will only import a certificate and a private key.
We need three things before starting the import process.
- Certificate (.cer) which download from Apple Developer website.
- Private key (.p12), which getting from your team (Read more on how to do it in How to manually add existing certificates to the Fastlane match).
- And a project with Fastlane match.
We start by running the import command.
fastlane match import --readonly true --type appstore
--readonly true to ensure we don't create or update existing certificates. I also specify
--type appstore because I use a distribution certificate in this case.
You will get the prompt asking for certificate path, private key path, and optional provisioning profile path.
Certificate (.cer) path:
# Enter path to your .cer
Private key (.p12) path:
# Enter path to your .p12
Provisioning profile (.mobileprovision or .provisionprofile) path
or leave empty to skip this file:
# We leave it blank in this example
Based on your Matchfile setting, you might get an additional prompt asking for git certificate URL, Apple developer account, and team if you are under multiple teams.
That's all you need to do to import an existing certificate. Now you can generate a provisioning profile and enjoy other match features like you usually do.
fastlane match appstore
Read more article about Fastlane, Development, or see all available topic
Enjoy the read?
If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.
Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.
If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.Become a patron Buy me a coffee Tweet Share
New Formatters in iOS 15: Why do we need another formatter
We have a new way to format data into a localized string in iOS 15. Why do we need another formatter? How does it differ from the old one? Let's find out.
Searchable modifier in SwiftUI: A UISearchController and UISearchBar equivalent
SwiftUI finally got native search support in iOS 15. We can add search functionality to any navigation view with the new searchable modifier. Let's explore its capability and limitation.