iOS: Establishing a Connection to APNS

Understanding token-based (.p8) and certificate-based (.p12) connections to connect to APNS (Apple Push Notification Service)

APNS is a system provided by Apple to send notifications to devices running iOS (such as the iPad and iPhone). It is also used to deliver notifications to macOS native applications and for Safari Web Push.

Apple provides two authentication methods to make a secure connection to APNS. The first is Certificate-Based Authentication (using a .p12 certificate). The second, newer method is Token-Based Authentication (using a .p8 key).

The table below breaks down the key differences.

Using Token-Based (.p8) vs Certificate-Based (.p12) Authentications to APNS with iZooto

Authentication TypeRequired FieldsExpires?Easy to use?
Token-Based (.p8)- .p8 file
- Key ID (10-character string)
- Team ID
- App Bundle ID (app-specific)
NoYes. Tokens can be generated in the Apple Developer panel and then uploaded to iZooto.
Certificate-Based (.p12)- .p12 file
- Private Key Password
Yes. Requires renewal in the Apple Developer Center once per year.No. Requires following a precise process to generate valid certificates.

🚧

Next:

Check out our token-based (.p8) or certificate-based (.p12) specific guides to learn how to generate and upload one to your iZooto account.