Previous episode: 7. Update with Background URL Downloads
Next episode: 9. Tint Complications
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Pro subscription. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
Note: At the time of writing, watchOS has a bug—verified by Apple—that sometimes prevents your app from registering for PushKit notifications. Apple told me it believes it has determined the root cause. However, there’s no ETA on when the fix will be available.
Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.
You can unlock the rest of this video course, and our entire catalogue of books and videos, with a Kodeco Personal subscription.
The only step left is to initialize the Push Notification Provider, which we can do in UpdatesApp.swift.
private let push = PushNotificationProvider()
apns-topic
Note: There’s one special consideration when sending a PushKit notification. The apns-topic header should be the name of your extension’s bundle identifier with .complication appended to it.
Niw ugozxmu, vnub suzpoxx a joqijekuweil tu zga kumtgo oqq, yeo tiiwl cub qke ahlj-cokel tu por.weogrucyicd.Ogxanop.fasnjtonoch.zulfnkevellerluun.reywguqediet.
Testing
Other than the extra text you need to add to the apns-topic, there’s nothing special about testing push notifications, here. If you’re able to register your app for PushKit notifications, you can test it the same way you would do with an iPhone.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.