Certificates and keys generated by the Apple Developer Program are saved on your machine. This is because they are needed for development. Therefore, I back them up and restore them when I initialize my machines.
This article explains how to back up and restore them.
How to export to the developer profile file
Export the necessary information from Xcode. Follow these steps.
(1) Select the “Preferences…” item from the “Xcode” menu.
(2) Open the “Accounts” tab.
(3) Click on the ellipsis button (“…”), located at the bottom left of the accounts list, and select “Export Apple ID and Code Signing Assets…”.
(4) An export dialog will be displayed. Enter the file name and the password.
Make the new file name’s name extension to developerprofile
as displayed initially. Then, enter the password into the Password
field and the Verify
field.
(5) Copy the exported file to any storage you like. The exported developer profile file is encrypted.
(6) Close the Preferences window.
How to restore from the developer profile file
You can also use Xcode when you would like to restore from the developer file. Do as follows.
(1) Select the “Preferences…” from the “Xcode” menu.
(2) Open the “Accounts” tab.
(3) Click on the ellipsis button (“…”), located at the bottom left of the accounts list, and select “Import Apple ID and Code Signing Assets…”.
(4) Select the developer profile file and click the “Open” button.
(5) Enter the password. When the password dialog appears, enter the password used during the export process and click the “OK” button.
(6) Xcode will display the number of imported accounts and certificates. Next, click the “OK” button.
(7) Open the “General” tab and return to the “Accounts” tab again. Then, click the “Sign In Again …” button. The imported Apple ID is signed out.
(8) Enter your Apple ID’s password and click the “Next” button.
(9) Follow the instruction if the multi-factor authentication dialog is displayed.
(10) If you sign in successfully, your joined team will be displayed.
(11) Close the Preferences window.