Requirements
Make sure you have the following before starting:- An iOS mobile app.
- A Paid Apple Developer Account with Admin access.
- A OneSignal Account.
- A Mac with Xcode 14+.
- An Xcode project with Push Notification capability enabled.
Set up APNs authentication
Generate your .p8 key in Apple Developer Account
- Log into your Apple Developer Account.
- Go to Certificates, Identifiers & Profiles > Keys.
- Click the blue plus (+) icon.
- If you don’t see it, contact your Admin for access.

- Select Apple Push Notifications service (APNs).
- When configuring the key, ensure that Sandbox & Production is selected:

- Enter a name for the key and click Continue, then Register.

- Download your .p8 key and store it securely. You won’t be able to download it again.
Upload the .p8 key to OneSignal
- Navigate to Settings > Push & In-App > Apple iOS (APNs) Settings in your OneSignal dashboard.

- Choose .p8 Auth Key (Recommended) as the authentication method.

.p8 File– The private key file you downloaded from your Apple Developer account.Key ID– A 10-character alphanumeric string (e.g.,ABC123DEFG) found next to your key name in the Keys section of your Apple Developer account. Make sure it matches the downloaded .p8 file.Team ID– A 10-character alphanumeric string (e.g.,9A1B2C3D4E) shown next to your team name in the top-right corner of your Apple Developer account. This is not the same as the Key ID.App Bundle ID– A reverse-domain string (e.g.,com.example.app) found in:- The Identifiers section of your Apple Developer account, or
- Xcode > Main App Target > Signing & Capabilities


You’ve successfully set up APNs authentication using a .p8 key in OneSignal.Your iOS app is now ready to send and receive push notifications! 🎉
.p8 troubleshooting
Ensure you didn’t upload a .p12 by mistake
.p8keys come from the Keys section of your Apple Developer account..p12certificates are from the Certificates section. These are not compatible with .p8 authentication.
Confirm you have the correct Key ID
- Go to your Apple Developer > Keys section.
- The Key ID is the 10-character string shown next to your key name (e.g.,
ABC123DEFG). - Match the Key ID you entered in OneSignal with the one listed for the downloaded
.p8key. - Do not confuse this with your Team ID — both are 10-character strings but found in different places.
Verify the Team ID
- Your Team ID is the 10-character string shown next to your team name in the top-right corner of your Apple Developer account.
- Make sure it is copied exactly and matches the account where the key was generated.
- Do not confuse this with your Key ID — the Team ID identifies your developer account, not a specific key.
Ensure the key has apns capability
- When viewing your key in Apple Developer, the Apple Push Notifications service (APNs) capability should be listed.
- If not, revoke the key and create a new one.
Need help?
- Revoke the current
.p8key and create a new one from scratch. - Double-check you’re using a valid Bundle ID from the same account the key was created under.
- Reach out to
support@onesignal.comwith a screenshot of your Apple Developer Key configuration and the Key ID, Team ID, and Bundle ID.
Next steps
iOS SDK setup
Install the OneSignal SDK, initialize it in your app, and send a test notification.
Mobile SDK setup
Choose your platform and follow the full SDK integration guide for Android, iOS, or cross-platform frameworks.
FAQ
What’s the difference between .p8 and .p12?
A .p8 key is a token-based authentication key that does not expire and works across all apps under your Apple Developer account. A .p12 certificate is app-specific and expires after one year, requiring annual renewal. OneSignal recommends .p8 for its simplicity and lower maintenance. See the .p12 certificate guide for the alternative method.Does my .p8 key expire?
No. Unlike .p12 certificates, .p8 keys do not expire. Once created, a .p8 key remains valid until you revoke it in your Apple Developer account.Can I use one .p8 key for multiple apps?
Yes. A single .p8 key works for all apps under the same Apple Developer account. You can upload the same .p8 file to multiple OneSignal apps — each app only needs its own unique Bundle ID.Do I need a provisioning profile, and how do I create one?
Yes, Apple requires different types of profiles for development, testing (Ad Hoc), and distribution to the App Store. In Xcode, select Automatically manage signing to create one automatically.