Apple — .p8 key (recommended)

APNs authentication key that doesn't expire and works for all your apps.

To send directly to Apple (APNs) you need a .p8 key or a .p12 certificate. We recommend the .p8:

  • it doesn't expire;
  • it works for all the apps in your developer account;
  • and it works for sandbox and production at the same time.

1. Create the key at Apple

  1. Go to developer.apple.com → Certificates, Identifiers & Profiles → Keys → +.
  2. Give it a name and check Apple Push Notifications service (APNs).
  3. Continue → Register → Download. The AuthKey_XXXXXXXXXX.p8 file can only be downloaded once.
  4. Write down the Key ID, the 10 characters in the file name, and your Team ID, at the top right of the developer account.

2. Upload it to Pushtifly

Apps → your app → Credentials → iOS (APNs) → .p8 key:

  • the .p8 file;
  • the Key ID and the Team ID;
  • your app's Bundle ID (for example com.yourcompany.app).

Pushtifly validates it against Apple when you upload it.

Sandbox and production environments

With a .p8 you don't have to choose: Pushtifly sends to each device's environment (sandbox for apps installed from Xcode, production for TestFlight and the App Store). If a token fails with BadDeviceToken in one environment, Pushtifly tries the other and corrects itself.

Common errors

  • InvalidProviderToken: wrong Key ID or Team ID, or the key was revoked.
  • TopicDisallowed / BadTopic: the Bundle ID doesn't match the app's.
  • Repeated BadDeviceToken: mixed environments (for example, the app built in debug sending to production). The integration status detects and explains it.