Backup certificates and keys for Xcode

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.

TOC

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…”.

Export Apple ID and Code Signing Assets
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.

Exporting Dialog
Exporting Dialog

(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…”.

Import Apple ID and Code Signing Assets.
Import Apple ID and Code Signing Assets.

(4) Select the developer profile file and click the “Open” button.

Open the developer profile file
Open the developer profile file

(5) Enter the password. When the password dialog appears, enter the password used during the export process and click the “OK” button.

Enter the password
Enter the password

(6) Xcode will display the number of imported accounts and certificates. Next, click the “OK” button.

Accounts and ceritificates are imported
Accounts and ceritificates are imported

(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.

Sign in again
Sign in again

(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.

Authored Books

Let's share this post !

Author of this article

Akira Hayashi (林 晃)のアバター Akira Hayashi (林 晃) Representative(代表), Software Engineer(ソフトウェアエンジニア)

アールケー開発代表。Appleプラットフォーム向けの開発を専門としているソフトウェアエンジニア。ソフトウェアの受託開発、技術書執筆、技術指導・セミナー講師。note, Medium, LinkedIn
-
Representative of RK Kaihatsu. Software Engineer Specializing in Development for the Apple Platform. Specializing in contract software development, technical writing, and serving as a tech workshop lecturer. note, Medium, LinkedIn

TOC