In fact, I was going to do certificate management based on match, but it didn’t meet the requirements.

The main problem is that there is no way to identify whether the certificate for this account is already installed, leading to repeated creation. It’s a bruise. There’s no way to fix it.

Problem/pit

  • The Apple background limits the number of certificates issued by the account to two, if there are many packages there is no way. But some of our accounts have more than one APP
  • Unless it is an APP under one account, and many people develop, it is meaningful to use this
  • Someone on the Internet seems to be working on this, so you can search for a solution

Create a certificate

Lane :setup_certs do match(app_identifier:ENV["APPID"], username:ENV[" username "], type: "adhoc", git_URL: ENV["MATCHURL"], shallow_clone: true, skip_docs:true, git_branch:ENV["APPNAME"]) match(app_identifier:ENV["APPID"], username:ENV["USERNAME"], type: "appstore", git_url: ENV["MATCHURL"], shallow_clone: true, skip_docs:true, git_branch:ENV["APPNAME"]) match(app_identifier:ENV["APPID"], username:ENV["USERNAME"], type: "development", git_url: ENV["MATCHURL"], shallow_clone: true, skip_docs:true, git_branch:ENV["APPNAME"]) endCopy the code

Use certificate

Add this paragraph to the packaging script

Match (app_identifier:ENV["APPID"], type: gym_type, git_URL :ENV[" MATCHURL"], shallow_clone: true, readonly:true, git_branch:ENV["APPNAME"])Copy the code