Local notifications are now known as User Notifications in Swift 3 and iOS 10. They can take 3 forms – badges, sounds and alerts (the latter appear on the lock screen).

To set them up in Swift 3 do the following:

1. Use UserNotifications by importing it:

1. Ask for permissions (yes, you need to ask permission for EVERYTHING in Apples’ world). Grab the applications shared instance and feed it the types of alert you need (you need at least one):

When the above is fired you can expect a notification on the users screen – asking for permission!

2. Create the content of your notification:

3. Create a scheduled time to fire it:

4. Ask iOS very nicely if it wouldn’t mind scheduling this:

And you’re done! Try this out and see if it gives you a message within 5 seconds!

Where to go Next

This tutorial comes straight out of The Complete iOS Developer Course. Over 40 hours long it contains everything you need to create awe inspiring apps fast!

Click here to check it out!

How to Use User Notifications in iOS 10 – Formerly Local Notifications

Leave a Reply

Your email address will not be published. Required fields are marked *

Share This

Want this Post in Easy to Understand Video Form?

Then get the Complete iOS Developer Course. Over 50 hours of pure Swift coding goodness designed to turn you into a coding master!

One Time Offer - $9! Click to Get it!

WARNING: Once this box is closed the offer will not be shown again.

Thank you!