Register to receive remote notifications via Apple Push Notification service.
- iOS 8.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Call this method to initiate the registration process with Apple Push Notification service. If registration succeeds, the app calls your app delegate object’s
application(_: method and passes it a device token. You should pass this token along to the server you use to generate remote notifications for the device. If registration fails, the app calls its app delegate’s
application(_: method instead.
If you want your app’s remote notifications to display alerts, play sounds, or perform other user-facing actions, you must request authorization to do so using the
request method of
UNUser. If you do not request and receive authorization for your app's interactions, the system delivers all remote notifications to your app silently.