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!

Creating User Notifications in iOS 12 – Formerly Local Notifications
Tagged on:     

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share This

Get your FREEapp monetisation flowchart!

Use our epic flowchart to help you find the money in your idea! If you're thinking of making an app then this is vital information!


You have subscribed! Please check your email to confirm this subscription and to receive your item!