Our context involves smart kitchen appliances, where cooking may be initiated by an app or directly by the device.
When the app is not running, we can only start a Live Activity through a remote push notification. However, an increasing number of users report issues where they cannot update or terminate the Live Activity.
While we can reproduce this issue in some cases, it is inconsistent and lacks a clear pattern.
I have a sample project and would like to confirm the following questions:
When the app is not running, does each pushToStartToken update wake the app and reliably trigger the callback below?
for await pushToken in Activity<DeviceAttributes>.pushToStartTokenUpdates {
}
When the app is not running, does each pushTokenUpdates update wake the app and reliably trigger the callback below?
Task {
for await activity in Activity<DeviceAttributes>.activityUpdates {
Task {
for try await tokenData in activity.pushTokenUpdates {
}
}
}
}
Must pushToStartTokenUpdates and pushTokenUpdates be placed directly in application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?), or can they be in another wrapper, such as an RxSwift wrapper?
If pushTokenUpdates is updated, but the received pushToken fails to synchronize to the server due to network issues, how should this be handled?
Alternatively, if you have any better suggestions, I would be very grateful to hear them.
Here is a simple example.