# Generate iOS Push Key (NEW)

{% hint style="warning" %}
This page is no longer being updated. Please refer to our [Push Notifications - OneSignal](/guides/integration/push-notifications-onesignal.md) for current configurations and support.
{% endhint %}

## Prerequisites

* Created [Bundle Identifier](/natively-platform/app-info/ios-build.md#bundle-identifier) & [AppStore App Id](/natively-platform/app-info/ios-build.md#app-store-app-id)

### Generate Push Key

## Step 2. Generate a new p8 key

Log in to your [Paid Apple Developer Account](https://developer.apple.com/) and navigate to **Certificates, Identifiers & Profiles** > **Keys** and select the **Blue +** button.

<figure><img src="https://files.readme.io/1e2ff6e-Apple_Key_Page.jpg" alt="2616"><figcaption><p>Apple Developer Account - Keys Page</p></figcaption></figure>

Select **Apple Push Notifications service (APNs)**, and enter a name for the key.

<figure><img src="https://files.readme.io/312d551-Apple_Key_Page_-_Register.jpg" alt="2622"><figcaption><p>Apple Developer Account - Register a New Key Page. Select APNs.</p></figcaption></figure>

Select **Continue,** and on the next page, select **Register**.

**Download** your new key and save it in a secure place. You can only download it once, so don't lose it. Then, click **Done,** and you will have a new key.

> 🚧
>
> Previous Token Revokation
>
> You can have up to two .p8 keys in your Apple account. If you need to generate a third key, you will need to revoke one of your existing keys and it can no longer be used.

*Note: .p8 keys are in the “keys” section of the Apple developer account and the .p12 certificates are under “certificates”. In your Apple account, you can only have two .p8 keys, but you can have both active .p12s and .p8s.*

### Gather all required data

1. Now you have .p8 downloaded
2. Also you will need **Key ID** and **Team ID**&#x20;

<figure><img src="/files/o7dPzLHZuNRF9IdYATPb" alt=""><figcaption></figcaption></figure>

3. Get your **Bundle ID**

<figure><img src="/files/o9OWRqtOX3n6bNJDfVKe" alt=""><figcaption></figcaption></figure>

Now you have all the data to continue configuring your [One Signal App](/guides/setup-one-signal-app.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.buildnatively.com/guides/generate-ios-push-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
