iospush-notificationapple-push-notificationsaccess-tokensilentpush

How do you get the push token to use without registering for remotes silent notifications?


Reading from WWDC 2015 Session 720 it says:

Silent notifications are enabled by default. The user does not need to give permission to your app to use them. You can start using them without asking the user for permission

My question is:

  1. How do you get the push token to use without registering for remotes?
  2. If I still have to register, then what does "default" mean here?

Does it mean that you don't have to prompt to register, but still you have to register under the hood upon app launch? Which likely means default was a very bad word to choose?

I read this question but it doesn't answer this.


Solution

  • You still have to register for push notifications. Just don't register the UIUserNotificationTypeAlert or UIUserNotificationTypeBadge or UIUserNotificationTypeSound type to make it silent and so that the user doesn't get prompted to enable push notifications