Live activities doesn’t get notifications token

Hi everyone, I’m currently learning Swift and Swift UI by myself for my master degree. Since yesterday I’m building a little app to implement Live Activities and Dynamic Island notifications, because they’re to cool to be ignored, but something goes wrong. I’m following this tutorial : https://techholding.co/blog/Live-Activities-in-iOS-16.1-and-later-in-SwiftUI/ But when it comes to the startDeliveryPizza function to lunch live activity, I’m stuck in an infinite loop inside the task
Task {
for await pushToken in deliveryActivity.pushTokenUpdates {
let pushTokenString = pushToken.reduce("") { $0 + String(format: "%02x", $1)}

print("Push token str = \(pushTokenString)")
}
}
}
Task {
for await pushToken in deliveryActivity.pushTokenUpdates {
let pushTokenString = pushToken.reduce("") { $0 + String(format: "%02x", $1)}

print("Push token str = \(pushTokenString)")
}
}
}
After setting a time out, it appears that I never receive any push token. I don’t need to send real push tokens from a server, it’s juste a little project made to be built on my phone. Can anyone help me to fix this please ? I’d really like to understand the problem and learn to fix this. And it’s really hard to find good documentation about live activities and Dynamic Island on the web
Live Activities in iOS 16.1 and later in SwiftUI | Tech Holding
With each new iteration of iOS, Apple introduces exciting features to enrich the user experience. One such feature that has gained popularity is the Live Activity Widget. This powerful widget allows users to have real-time information and updates from their favorite apps directly on their home screen. In this blog post, we will explore the Live ...
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?