Skip to content

Renew Apple Certificate Procedure

Harel M edited this page Sep 10, 2022 · 8 revisions

Once a year there's a need to update the apple certificate due to expiration. The following are the steps that needs to be done:

  1. In XCode, open preferences, select accounts, select the IHM account, click the "+" at the bottom and add a distribution certificate
  2. Go to https://developer.apple.com/account/resources/certificates/list and make sure there's a valid certificate that did not expire
  3. Go to the profiles and edit the provisioning profiles to use the new certificate
  4. Download the provisioning profile
  5. Go to key-chain app and export the distribution certificate in p12 and cer formats with the name ihm-dist and store password
  6. Encrypt all files with (p12, cer, profiles) with: openssl aes-256-cbc -k the-password -in ~/Downloads/file -e -a -out ./file.enc
  7. cat ./appveyor.mobileprovision | grep UUID -A 1 to get the UUID
  8. Update IsraelHiking.Web/ios/App/App.xcodeproj/project.pbxproj PROVISIONING_PROFILE field
  9. Update IsraelHiking.Web/ios/exportOptions.plist provisioningProfiles field
  10. Commit and push them to GitHub
  11. Make sure the build runs as expected and the ipa file gets archived.