Registering for notifications

Any app that wants to present notifications has to ask the user for permission before they do so. This process is called registering for notifications. It's important that you make sure your user understands why you're asking their permission to send notifications. After all, you're interrupting your user while they're trying to achieve something in your app, and the permission alert prevents them from doing so. It's often a great idea to hold off on asking for permission to send notifications until the user does something that can be improved specifically by turning on notifications.

In the Notifications example app, a user can add reminders for certain actions that they need to perform. The best time to ask ...

Get Mastering iOS 12 Programming - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.