32

How to manually add existing certificates to the Fastlane match

 3 years ago
source link: https://sarunw.com/posts/how-to-manually-add-existing-certificates-to-fastlane-match/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to manually add existing certificates to the Fastlane match


Table of Contents revenucat2.jpg

The Problem

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.

revenucat2.jpg

Fastlane match import

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.

Prerequisite

We need three things before starting the import process.

  1. Certificate (.cer) which download from Apple Developer website.
  2. 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).
  3. And a project with Fastlane match.

Steps

We start by running the import command.

fastlane match import --readonly true --type appstore

I supply --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.

Be mindful on --type because, by default, Fastlane match will import the certificate as development type, which might not be the type you want for this kind of job.

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

You may also like

How to share an iOS distribution certificate

Learn how to create, export, and import certificate without any third-party tools.

Development
How to renew an expired certificate with Fastlane Match

Fastlane Match saves us a lot of time managing certificates and provisioning profiles, but there is one thing that we have to do it manually. That is a renewal expired certificate. Luckily, we have to do it once a year. Let's learn how to do it.

Development Fastlane

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

Previous
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.

Next
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.

← Home


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK