# iOS certificate-based configuration

<Aside type="caution" title="Important">
[Live Activities](/developer/pushwoosh-sdk/ios-sdk/ios-live-activities/) in Pushwoosh require [token-based configuration](/developer/first-steps/connect-messaging-services/ios-configuration/ios-token-based-configuration/). If you intend to use Live Activities, ensure your iOS configuration uses this method, as certificate-based configuration is not supported.
</Aside> 

Follow this guide to configure the iOS platform manually.

<Aside type="note">
Make sure you've created a provisioning profile for your app to submit it to the App Store. Read more in the [Apple developer documentation](https://developer.apple.com/help/account/provisioning-profiles/create-an-app-store-provisioning-profile).
</Aside>

## Generating a certificate request file

1. Launch **Keychain Access,** go to **Certificate Assistant** and click **Request a Certificate From a Certificate Authority**:

<img src="/ios-configuration-ios-platform-configuration-1.webp"
     alt="Keychain Access on macOS showing Certificate Assistant menu to request a CSR for APNs certificate"/>

2. Enter the required information and choose **Saved to disk**. You should leave the CA email field blank. Click **Continue** and **Save** the certificate request using the suggested name.

<img src="/ios-configuration-ios-platform-configuration-2.webp"
     alt="Create CSR in Keychain Access"/>

## Creating an APNs certificate in Apple Developer Portal

1. Sign in to the [Apple Developer Portal](https://developer.apple.com/account/) and open **Certificates, Identifiers & Profiles** in the **Account** tab. Click **Add**:

<img src="/ios-configuration-ios-platform-configuration-3.webp"
     alt="Apple Developer Portal—Certificates, Identifiers & Profiles dashboard with Add certificate button"/>

2. Choose the certificate type you need and click **Continue** at the bottom of the page.

<Aside type="note">
You can select the **Sandbox & Production** certificate type shown in the screenshot below and then
choose the appropriate **Gateway** when configuring the iOS platform in the Pushwoosh Control Panel.
You can also create Sandbox and Production certificates separately if needed.
</Aside>

<img src="/ios-configuration-ios-platform-configuration-4.webp"
     alt="Selecting APNs SSL (Sandbox & Production) certificate type in Apple Developer Portal"/>

3. Select your project’s **App ID** on the next page, then click **Continue**.

<img src="/ios-configuration-ios-platform-configuration-5.webp"
     alt="Choosing App ID for APNs certificate issuance in Apple Developer Portal"/>

<Aside>
You can skip **About Creating a Certificate Signing Request (CSR)** as you have already created one.
</Aside>

4. Choose the **Certificate Signing Request** you created previously.

<img src="/ios-configuration-ios-platform-configuration-6.webp"
     alt="Uploading the CSR file"/>

5. Download the certificate and add it to the **Keychain Access**. Once you click on the certificate, **Keychain Access** will be launched.

<img src="/ios-configuration-ios-platform-configuration-7.webp"
     alt="Downloading the certificate from Apple Developer Portal"/>

## Exporting the private key (.p12)

In **Keychain Access**, right-click the certificate you just added and choose Export.

<img src="/ios-configuration-ios-platform-configuration-8.webp"
     alt="Export the private key as .p12 from Keychain Access"/>

Save the **Personal Information Exchange (.p12)** file. You will be prompted to set up a password.

<Aside type="caution" title="Important">
Make sure to remember the Private Key Password, you will need it later.
</Aside>

After you type in your password, click **Allow** to finish exporting the Private Key.

## Configuring the iOS platform in Pushwoosh

In your Pushwoosh project, go to the **Configure Platforms** section and click **Configure** in the iOS row:

<img src="/ios-configuration-ios-platform-configuration-9.webp" alt="Pushwoosh Control Panel showing iOS row with Configure button"/>

In the opened form, choose **certificate-based manual configuration** and click **Next**:

<img src="/ios-configuration-ios-platform-configuration-10.webp" alt="Pushwoosh form with certificate-based manual configuration selected"/>

In the opened window, do the following:

* Upload the certificate file (.p12)
* Enter the **Private key password**
* Choose the **Gateway**

<img src="/ios-configuration-ios-platform-configuration-11.webp" alt="Fields for uploading .p12 file, entering password, and selecting gateway in Pushwoosh"/>

Click **Configure** to complete the setup.