UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

DAY 72

Project 21, part one


Tim Ferriss is a well-known podcaster and angel investor, who once said “in a digital world, there are numerous technologies that we are attached to that create infinite interruption.” And it’s true: there’s a little jolt of excitement when we see your iPhone screen light up, because it means something interesting has happened.

In iOS these app interruptions come in two forms: either the app has received some remote data from the internet and it needs to be shown immediately, or it scheduled a local alert to be shown at a specific day and time. Remote data, known as push notifications, takes quite a lot of set up because you need a server capable of communicating with Apple’s push notification server (APNS), but local alerts aren’t hard at all, so they are what we’ll be looking at today.

But please remember: just because you can show a notification doesn’t mean you should – if the user grants you some permission you should be grateful, and try not to abuse that responsibility!

Today you have three topics to work through, and you’ll learn about UNUserNotificationCenter, requesting permission for notifications, the different kinds of notification trigger, and more.

Need help? Tweet me @twostraws!

 

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

100 Days of Swift


The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.

Back to 100 Days of Swift

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.