Problem Description
We are encountering a pushToken retrieval failure when creating Live Activities using the ActivityKit framework in our iOS application.
Problem Symptoms
- Failure Rate: Approximately 40% of Live Activities created in production fail to obtain a pushToken
- Behavior: The Activity is created successfully, but
activity.pushTokenand theactivity.pushTokenUpdatesstream remain empty / return nothing - Impact: Unable to update Live Activities via APNS
Offline Issue Environment
- iOS Version: iOS 26.5
- Device: Physical iPhone device
- Deployment Environment: Production environment, release build
Code Sample
Task {
// Executed after Live Activity creation
for await activity in Activity<T>.activityUpdates {
...
if let activityTokenData = activity.pushToken {
// Report token to APNS service
reportTokenToAPNS(tokenString)
}
// Start async monitoring
self.registerPushTokenUpdates(...)
Log("actObserver: Live Activity registered successfully")
}
}
// Async monitoring
private func registerPushTokenUpdates<T: SAKActivityAttributes>(...) {
Task {
self.pushTokenObserveRecords.safe{ $0.append(activity.id) }
Log("Monitoring pushToken updates for Live Activity <\(activity.id)>")
for await data in activity.pushTokenUpdates {
let pushToken = pushTokenString(with: data)
// Report token to APNS service
reportTokenToAPNS(pushToken)
}
}
}
System Log Evidence