# iOS token-based configuration

For faster communication with APNs, you can configure your iOS project using token-based authentication.

<Aside type="note">
To learn more, please check out the [Apple Developer docs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns).
</Aside>

## Obtain an Encryption Key and Key ID from Apple

1. Log in to your Apple Developer account and navigate to the **Keys** section in the left-hand menu. Press **+** to create a new key.

2. In the **Key Description** field, enter a unique name for the key. Then, enable APNs in the **Key Services** section. Click **Continue**.

3. Copy the **Key ID**, which is a 10-character string, and download the **authentication token signing key**, which is a text file with a .p8 file extension.

## Configure the iOS platform in Pushwoosh

1. In your Pushwoosh project, go to the **Configure Platforms** section and click **Configure** next to the iOS platform.

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

2. In the configuration form that opens, choose **Token-based manual configuration** and click **Next**.

<img src="/ios-configuration-ios-token-based-configuration-2.webp" alt="iOS configuration form with token-based manual configuration option selected."/>

3. Paste the **Key ID** into the appropriate field.

<img src="/ios-configuration-ios-token-based-configuration-3.webp" alt="Field in Pushwoosh form to input the Key ID."/>

4. Upload the **.p8 signing key file** you downloaded from Apple in the **Auth Key** field.

<img src="/ios-configuration-ios-token-based-configuration-4.webp" alt="Field in Pushwoosh form to upload the .p8 authentication key file."/>

5. Enter your Apple Developer **Team ID** and **Bundle ID**.
<img src="/ios-configuration-ios-token-based-configuration-5.webp" alt="Form fields in Pushwoosh for entering Team ID and Bundle ID."/>

> To get your Team ID, go to your Apple Developer account and navigate to the **Membership** section. 
> 
> You can find a Bundle ID in the **Certificates, Identifiers & Profiles** section of your Apple Developer console.



6. Choose the appropriate gateway: **Sandbox** or **Production**.
<img src="/ios-configuration-ios-token-based-configuration-6.webp" alt="Gateway selection options for Sandbox and Production in the Pushwoosh configuration form."/>

7. Click **Configure** to complete the setup.


<Aside type="tip">
To check whether the iOS platform is configured successfully, send a test push or target a message to a specific device. For guidelines, see the [Test your integration](/developer/first-steps/test-your-integration) page.
</Aside>