Search code examples
fastlanefastlane-match

Fastlane match doesn't use existing signing certificates


So I'm currently setting up a new project and I've realized when creating adhoc and appstore builds. Fastlane doesn't seem to be using the existing certificate which created a couple months back. Instead, it seems to be generating a new certificate and using this to sign my profiles is there a way to specify/force Fastlane to use the old certificate rather than the new ones?


Solution

  • You can do it, but not simply, since this is not supported by fastlane match. You have two options:

    First, you could just use the get_certificates (previously cert) and get_provisioning_profile (previously sigh) actions instead of match (now called sync_code_signing). This gives you everything except the Git repo syncing.

    If you want the Git repo syncing (you probably do), then you can manually construct a repo identical to one match would create, but using your existing certs (see Manually Manage the fastlane match Repo). The basic trick is to create a new repo in precisely the correct structure by following the match source code, and then use Match::GitHelper.commit_changes to encrypt it. It's a pain to set up but from there you should be able to sync seamlessly.

    Alternatively, you can use sync_code_signing nuke to destroy your existing certs and regenerate from scratch. This will get match working at the expense of other teams who may be relying on your old certs.