Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS push notifications using TLS certificate vs. using authentication tokens

I am reading the documentation for both push using TLS certificates and push using authentication tokens

But besides explaining how to configure each, the articles don't really explain the differences or pros/cons of both approaches. Can somebody explain them to me?

like image 703
David Schumann Avatar asked Jul 13 '17 13:07

David Schumann


People also ask

Why do I need an Apple Push certificate?

To use advanced management with Apple iOS devices, you need an Apple push certificate. The certificate establishes a trusted connection between iOS devices and your organization's domain.

What is an Apple Push Notification certificate?

Push Notification Certificates let you send notifications to users of your app. They must be created before a Provisioning Profile since they are embedded within the Provisioning Profile. Note: While Push Notification Certificates are optional for regular iOS apps, they are required for Newsstand apps.

How does push notifications work on the iOS platform?

An iOS push notification is a message that pops up on an Apple device such as an iPhone. Before receiving push notifications from an app, iOS device users must explicitly give permission. Once a user opts-in, mobile app publishers can send push notifications to the users' mobile devices.


1 Answers

Token-based authentication is newer and essentially simplifies APNS authentication. It is based on a public and private key pair that you can generate on your Apple developer account.

Here are the main reasons why it is simpler:

  • The same key can be used for development and production apps whereas different certificates are needed when using certificate-based authentication.
  • The same key is used for all your apps referenced in your Apple developer account. Certificate-based authentication needs one certificate per app.
  • The key does not expire. Certificates do expire and need to be renewed every year or so.

A good source of intel is the 2016 WWDC video regarding APNS: https://developer.apple.com/videos/play/wwdc2016/724/

like image 179
Ika Avatar answered Oct 10 '22 14:10

Ika