-
Notifications
You must be signed in to change notification settings - Fork 33
Renew Apple Certificate Procedure
Harel M edited this page Jun 13, 2024
·
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:
- Go to key-chain app and delete the expired certificate and private key (they should have the same name: Harel Mazor, Harel Mazor (2K...)
- In XCode, open Settings..., select Accounts, select the IHM account, click Manage Certificates..., click the "+" at the bottom and click
Apple Distribution. This will create a new non-expired certificate - Go to https://developer.apple.com/account/resources/certificates/list and make sure there's a new certificate that is not expired
- Go to the profiles and edit the CI provisioning profiles to use the new certificate
- Download the provisioning profile
- Go to key-chain app and export the distribution certificate by right click and Export ..., choose cer file extension
- Export the private key using right click end Export... when asked, put the store password
- Encrypt all files with (p12, cer, provisioning profile) with:
/opt/homebrew/opt/[email protected]/bin/openssl aes-256-cbc -pbkdf2 -k the-password -in ~/Downloads/file -e -a -out ./file.enc
-
cat ./CI.mobileprovision | grep UUID -a -A 1
to get the UUID - Update
IsraelHiking.Web/ios/App/App.xcodeproj/project.pbxproj
PROVISIONING_PROFILE
field - Update
IsraelHiking.Web/ios/exportOptions.plist
provisioningProfiles
field - Commit and push them to GitHub
- Make sure the build runs as expected and the ipa file gets archived and uploaded to the app store