urbanairship / react-native-airship

Airship React Native module
Other
87 stars 62 forks source link

Starting iOS Live Activities #559

Closed robwalkerco closed 6 months ago

robwalkerco commented 6 months ago

Hey, I'm super excited to be able to start iOS Live Activities via push notifications.

I see that airship-mobile-framework-proxy is progressing to support ios-library 18.x.x (See https://github.com/urbanairship/airship-mobile-framework-proxy/pull/38)

Do you have any idea when we can expect react-native-airship to be updated to add support for starting Live Activities via push notification (Supported from https://github.com/urbanairship/ios-library/releases/tag/18.0.0)?

rlepinski commented 6 months ago

Probably this week. Do you have a good place to call restore & track in react native?

robwalkerco commented 6 months ago

Probably this week.

Amazing

Do you have a good place to call restore & track in react native?

We are using Expo with react-native-widget-extension (patched) to support Activities and integrate with Airship.

Currently, the Airship integration is basically just calling Airship.channel.restoreLiveActivityTracking(...).

I can see the example at https://docs.airship.com/platform/mobile/ios-live-activities/#starting-and-tracking-a-live-activity-from-a-push-notification with which adds the following to support the new functionality

Activity<DeliveryAttributes>.airshipWatchActivities { activity in
    Airship.channel.trackLiveActivity(activity, name: activity.attributes.orderNumber)
}

So we should be good to add that to our current setup, and be good to go 🎉

rlepinski commented 6 months ago

https://github.com/urbanairship/react-native-airship/pull/560

rlepinski commented 6 months ago

18.0.0 is out