Need to access the activity push token
jolamar opened this issue · 1 comments
jolamar commented
In order to send remote push updates we need to get the live activity push token.. looks something like this:
let activity = try Activity.request(attributes: attributes, contentState: contentState, pushType: .token)
if let data = activity.pushToken {
let token = data.toHexString()
// TODO: send to the backend.
}
This push token can be used in the backend to push updates to the live activity. I believe this needs to be updated here https://github.com/istornz/flutter_live_activities/blob/main/ios/Classes/SwiftLiveActivitiesPlugin.swift#L141
then ideally there would be a flutter method like .getPushToken(activityId)