From the course: iOS and watchOS App Development: Notifications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use provisional permissions

Use provisional permissions

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Use provisional permissions

- [Instructor] You've seen how notifications work with standard permissions. There's also a provisional permission state, which only makes sense once you've seen this run once. This is a kind of sampler of notifications so users can decide if notifications are worth their time. There's no permission question. Notifications deliver quietly instead of prominently. To add this functionality is super simple. Go ahead and stop the app, head back to ViewController.swift, head over to the AppDelegate, and go down into our Request Authorization options. You just have to add one more option called provisional. With that, we can go ahead and run again, however, I'm going to do something important here. I'm going to go back to the simulator and I'm going to hit Hardware, Erase Content and Settings, and Erase, so we're starting from a completely clean phone. Wait a second for it to reboot. Now that it's done, go ahead and run it again. Schedule a pizza and you'll see you don't get any message at…

Contents