Skip to content

Release 5.2.0

Compare
Choose a tag to compare
@emawby emawby released this 30 Jul 20:54
· 11 commits to main since this release
fa122f5

What's new

🎉 Push to Start Live Activities

Starting with iOS 17.2, Live Activities can now be started via push notification (Apple's documentation). This change enhances the OneSignal SDK to provide application's access to the full suite of Live Activity functionality.

To use Push To Start Live Activities, see documentation on How to start a Live Activity with a remote push notification.

Default Live Activity
The concept of a "Default" Live Activity has been established in the SDK, which eliminates the need for a customer app to define and manage their own ActivityAttributes. The primary use case of the "Default" Live Activity is to facilitate easier cross-platform adoption.

  • A new function OneSignal.LiveActivities.SetupDefault() which tells the OneSignal SDK to manage the LiveActivity lifecycle for the DefaultLiveActivityAttributes type. When calling this method, a customer can use both push-to-start and push-to-update notifications to start/update/end their Default Live Activity.
  • A new function OneSignal.LiveActivities.StartDefault(activityId, activityAttributes, initialContentState) which allows a customer app to start a live activity based on the DefaultLiveActivityAttributes type "in app".

Four New APIs for Live Activities

OneSignal.LiveActivities.SetupDefault(LiveActivitySetupOptions options)
OneSignal.LiveActivities.StartDefault(string activityId, IDictionary<string, object> attributes, IDictionary<string, object> content)
OneSignal.LiveActivities.SetPushToStartToken(string activityType, string token)
OneSignal.LiveActivities.RemovePushToStartToken(string activityType)

Please see the PR description for more details.

  • Push to start live activities added to the SDK (#107)

🔧 Native SDK Updates

Updated included Android SDK to 5.1.18

  • Fixed Xiaomi notification click not foregrounding app
  • Fixed FCM push token not being refreshed
  • Poll for notification permission changes to detect permission change when prompting outside of OneSignal
  • Cold start creates new session and refreshes the user from the server
  • Immediately process pending operations when privacy consent goes from false to true
  • Fixed OneSignal.Notifications.RequestPermissionAsync() not firing when permission was already granted
  • Fixed Operation Model Store adding duplicate operations when the same ones that were previously added to the store and persisted, are re-read from cache
  • Fixed a bug causing clicking an unexpanded group notification results in only registering the click result for the final notification in the group

For full changes, see the Android native release notes

Updated included iOS SDK to 5.2.2

  • Prevent In-App Message request crashes by making null values safe
  • Added Dispatch Queues to all executors to prevent concurrency crashes
  • Fixed clearing notifications incorrectly such as when pulling down the notification center
  • Fixed a purchases bug for the amount spent
  • Fixed a build issue for mac catalyst
  • Fixed crash when IAM window fails to load by using the main thread
  • Network call optimizations: Combine user property updates for network call improvements

For full changes, see the iOS native release notes