If push-to-start notifications work at first but fail later, the problem is usually an expired pushToStartToken. Apple rotates these tokens frequently, often every day or after the app closes. If iOS updates the token while your app is not running, the app must find the new token when it starts and send it to our servers. If the app sends an old token, push delivery fails.
To fix this, make sure the app checks for token updates immediately when it opens.
Put your Live Activities setup code, such as Pushwoosh.LiveActivities.setup(...), in the application(_:didFinishLaunchingWithOptions:) method or at the root of your SwiftUI app. Do not put this setup code inside network requests, consent managers, or other asynchronous blocks. If the app starts in the background to handle a token update, these delays can prevent it from catching the new token from the system.
Comments
0 comments
Please sign in to leave a comment.