# Build Settings between Monaca and Xcode

If you want to develop your Monaca app in both Monaca Cloud IDE and Xcode on your Mac OS X, you will need to synchronize the build settings (private keys and certificates) of the app you use in these two environments.

In this page, we will show you how to:

* [Export the Build Settings from Xcode to Monaca Cloud IDE](#export-the-build-settings-from-xcode-to-monaca-cloud-ide)
* [Export the Build Settings from the Monaca Cloud IDE to Xcode](#export-the-build-settings-from-the-monaca-cloud-ide-to-xcode)

## Export the build settings from Xcode to Monaca Cloud IDE

In case you've already configured your build settings (private keys and certificates) in your Mac OS X (Xcode) and you want to export them to the Monaca Cloud IDE, follow these instructions:

### Step 1: Export a private key and a certificate in Keychain Access

In order to export the private key in Keychain Access, please follow the instruction below:

1. In your Mac OS X, go to **Applications → Utilities → Keychain Access**.
2. Select `Certificates` on the left panel of the Keychain Access window.

![](https://3091308003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfWe1U2tFctp8FkP9W8%2F-MfogB3z2h2dVR5PN6Lt%2F-MfohMpLGqZty_MQUBaf%2Fimage.png?alt=media\&token=8fc12113-580f-4a7f-a99e-fcf5830a0555)

3\. Right-click on the certificate you want to export and select **Export “**`CERTIFICATE NAME`**”**. Please make sure to choose a certificate that has a private key. Only a certificate that has a private key can be imported to Monaca.

![](https://3091308003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfWe1U2tFctp8FkP9W8%2F-MfogB3z2h2dVR5PN6Lt%2F-Mfoi1C4qEUm_9uBDa8R%2Fimage.png?alt=media\&token=294b9fca-4b71-4a4c-ac2e-7cbebdf3ab47)

4\. The export screen will be displayed. Save it as a private key by selecting the file format as`Personal Information Exchange (.p12)`. Then, click **Save**.

![](https://3091308003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfWe1U2tFctp8FkP9W8%2F-MfogB3z2h2dVR5PN6Lt%2F-MfohUY02BrJjnAN0ZMy%2Fimage.png?alt=media\&token=0e83bc7f-189e-4941-8aa3-af10845bc3e3)

5\. Enter a password of the private key and click OK. By doing so, a private key file with extension `.p12` will be created. Please remember this password as you will need it when importing this file in the Monaca Cloud IDE later.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/4.png)

6\. Now, right-click on the certificate you want to export again and select **Export “**`CERTIFICATE NAME`**”**. This time, save it as a certificate by selecting the file format as `Certificate (.cer)` and then click **Save**.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/5.png)

### Step 2: Import a private key and a certificate to Monaca

{% hint style="info" %}
In Monaca, you can register only one private key. If you are using different private keys for the developer and the distribution certificates, you will need to re-import the private key that is related to the certificate you are going to use.
{% endhint %}

To import the private key and certificate in Monaca Cloud IDE, follow the instructions below:

1. From the Monaca Cloud IDE menu, go to **Configure → iOS Build Settings**. Then, click **Import**.

![](https://3091308003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfWe1U2tFctp8FkP9W8%2F-MfogB3z2h2dVR5PN6Lt%2F-MfoiJrGthVgzSbLGSSU%2Fimage.png?alt=media\&token=4bb98c5e-0ef2-420b-ab4c-d558a02831f2)

2\. Browse the private key file (`.p12` file) and enter the password of that key. Then click **Import**.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/7.png)

3\. In the `Register Issued Certificate` section, click the **Upload Certificate** button to upload either developer or distribution certificates corresponding to the imported private key.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/8.png)

4\. Browse the certificate file (`.cer` file) and upload it.

## Export the build settings from the Monaca Cloud IDE to Xcode

{% hint style="info" %}
From Monaca Cloud IDE, the private key and certificate are exported as one file.
{% endhint %}

To export a private key and a certificate from the Monaca Cloud IDE, please follow the instructions below:

1. From the Monaca Cloud IDE menu, select **Configure → iOS Build Settings**.
2. In the `Certificates registered in Monaca` section, click the `Export` icon of the certificate you want export.

![](https://3091308003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MfWe1U2tFctp8FkP9W8%2F-MfogB3z2h2dVR5PN6Lt%2F-MfoiWgLrT9aKRdrtdoG%2Fimage.png?alt=media\&token=2cc2478a-ca36-4e35-8ab4-7c12bf1e5c40)

3\. Then, you will be asked to input a password before exporting. Remember this password as it is required when importing this certificate later.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/10.png)

4\. After clicking the **Export** button, you will then be able to download a file with `.p12` extension (Ex: `dev_certification_ios.p12`). This file consists of a private key and a certificate.

5\. Double-click the downloaded file. Input the password of the file and click **OK**. After that, you can use the private key and certificate in Xcode.

![](https://docs.monaca.io/images/monaca_ide/manual/build/import_export/11.png)
