O'Reilly logo

Mastering iOS 11 Programming - Second Edition by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Registering for notifications

The first step you must go through if you're planning on showing notifications to your user is asking permission to do so. We call this registering for notifications. It's important that you make sure your user understands why they're being prompted for this permission. 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 permission for notifications until the user does something that can be improved if they turn on notifications.

When you ask permission for notifications, you have the option to specify the kinds of notification that you want to send the user. You can pick ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required