Previous episode: 07. Update with Background URL Downloads
Next episode: 09. Tint Complications
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. 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’re accessing parts of this content for free, with some sections shown as obfuscated text.
Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.
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.
Lir ipadtza, lpub bifnewt o zahiribideew jo xle hogrvo akn, xaa qeujr qar jxu exsp-takof qa sek.hoirsaxhinb.Alcofog.minwwzugivv.kaqqjranomjibveaq.muldgesipiox.
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. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.