> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS Push

> Connect your APNS account to SuprSend by uploading the auth key and team ID to send iOS push notifications across development and production builds.

## Add APNs configuration on SuprSend dashboard

On the SuprSend dashboard, go to vendor page from side panel, select iOSpush and fill in below details. You'll get all these information from [Apple developer account](https://developer.apple.com/account/)

![](https://mintcdn.com/suprsend/ysJyO3LOXwZ5L098/images/docs/f8409f2-APNs_vendor_page.png?fit=max\&auto=format\&n=ysJyO3LOXwZ5L098\&q=85\&s=b10b6dbf98a3b9df0be32640528a2f53)

| Form Field | Description |
| - | - |
| Nickname | You can give any name which may help you to identify this account easily |
| Mode/Environment | Select **Production** if you're testing the app via TestFlight or running the live App Store build. Select **Development** if you're testing the app locally through Xcode (debug build on a connected device or simulator). The mode here must match the build type you're testing with - see the warning below. |
| Upload p8 file | You'll get .p8 key file from your apple developer account. Refer [section below](https://docs.suprsend.com/docs/ios-push-vendor-integration.md#generate-p8-key-file-and-auth-key-id) to see how to generate .p8 file |
| Auth Key ID | Auth key ID is a part of the filename of your .p8 file. Refer [section below](https://docs.suprsend.com/docs/ios-push-vendor-integration.md#generate-p8-key-file-and-auth-key-id) to see how to get Auth key ID |
| Team ID | You'll get Team ID from your apple developer account. Refer [section below ](https://docs.suprsend.com/docs/ios-push-vendor-integration.md#how-to-get-team-id)to see how to get Team ID |
| Bundle ID | Bundle ID is a unique identifier of your app. SuprSend will require this key to identify your app for sending push notification.[Refer section](https://docs.suprsend.com/docs/ios-push-vendor-integration.md#how-to-get-bundle-id) to see how to get Bundle ID |

> [!WARNING]
>
> **Mode/Environment must match your build type.** This is the most common reason iOS pushes fail to deliver. If the mode doesn't match the build, APNs rejects the push with a `BadDeviceToken` error (visible in SuprSend logs as the delivery failure reason) because sandbox and production tokens are issued by different APNs endpoints and aren't interchangeable.
>
> * Set **Production** when testing on **TestFlight** builds or the live **App Store** build (these use production APNs tokens).
> * Set **Development** when testing locally through **Xcode** - i.e., a debug build run on a physical device or simulator (these use sandbox APNs tokens).
>
> If you flip these by mistake (e.g., Production mode while debugging in Xcode, or Development mode on a TestFlight build), the device will register a token but every push will fail with `BadDeviceToken`. To fix it, switch the vendor mode to match the build you're testing.

### Generate .p8 key file and Auth key ID

**1. To generate a .p8 key file, login to your Apple developer account page**

To generate a `.p8 key` file, login to your [Apple developer account](https://developer.apple.com/account/) page, then select **Certificates, IDs & Profiles**.

![](https://mintcdn.com/suprsend/jhGzZpggWCp1KSgu/images/docs/db8afde-Frame_57_1.png?fit=max\&auto=format\&n=jhGzZpggWCp1KSgu\&q=85\&s=7ce06c7d82018176b0e2aa0c6fdc4a77)

**2. Select `Keys`**

Under Certificates, IDs & Profiles section, select **"Keys"**

![](https://mintcdn.com/suprsend/iZJ8XgyTL4NrLVtX/images/docs/aa8b860-image.png?fit=max\&auto=format\&n=iZJ8XgyTL4NrLVtX\&q=85\&s=34df96c83681e04b318d21fb34ce69ec)

**3. Add a new key**

Click on "`+`" button next to keys to add a new key

![](https://mintcdn.com/suprsend/ftswjUsq0JlUh-RL/images/docs/00113e9-image.png?fit=max\&auto=format\&n=ftswjUsq0JlUh-RL\&q=85\&s=23029b200ac22aaeeb11501ac112d322)

**4. Type in your key name and check the Apple Push Notification service**

On the new key page, type in your key name and check the Apple Push Notification service (APNs) box, then click “Continue” and “Register".

![](https://mintcdn.com/suprsend/y77gmHjmaTSnbCzd/images/docs/c1c2f64-image.png?fit=max\&auto=format\&n=y77gmHjmaTSnbCzd\&q=85\&s=b153d5e5a6d6ac32c8098d61c7a94afa)

**5. Download the p8 key file**

Once the key is generated, **`download the p8 key`** file by clicking on "`Download`"

![](https://mintcdn.com/suprsend/09Y8zJBSaqwwb23r/images/docs/65f5a48-Frame_58.png?fit=max\&auto=format\&n=09Y8zJBSaqwwb23r\&q=85\&s=4b0be7b0a53a9dfe9de2b034686237bb)

The Auth Key filename will look like this: `**AuthKeyABCD1234.p8**`, the `**ABCD1234**` is the Key ID for this key, add this key ID in Auth key ID field on Vendor configuration page

### How to get team ID

You can get team ID from your [Apple developer account membership page](https://developer.apple.com/account/#/membership)

![](https://mintcdn.com/suprsend/jhGzZpggWCp1KSgu/images/docs/d2d176d-Frame_59.png?fit=max\&auto=format\&n=jhGzZpggWCp1KSgu\&q=85\&s=3a1d998eadc3980ea5b8450dc78f6627)

### How to get bundle ID

You can get this ID from your app project

![](https://mintcdn.com/suprsend/jhGzZpggWCp1KSgu/images/docs/e5f785b-Frame_60.png?fit=max\&auto=format\&n=jhGzZpggWCp1KSgu\&q=85\&s=3821f637362ed90a038c571f009ee683)

***


## Related topics

- [iOS Push](https://docs.suprsend.com/docs/ios-push-template.md)
- [iOS Push Setup](https://docs.suprsend.com/docs/react-native-ios-push-integration.md)
- [iOS Push Setup (APNs)](https://docs.suprsend.com/docs/flutter-apns-push.md)
- [Native Push Setup](https://docs.suprsend.com/docs/expo-push-setup.md)
- [Add a channel](https://docs.suprsend.com/docs/add-a-channel.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.