Swan SDK
Changelog

React Native

Release history for the Swan React Native SDK.

[react-native/2.9.2] — 2026-06-25

Distribution: npm — @loyalytics/swan-react-native-sdk@2.9.2 Platforms: iOS 13.0+ · Android API 21+ · React Native 0.70+ (verified through 0.86)

Fixed

  • The Android module now builds on every supported React Native, from 0.70 through 0.86. Earlier 2.9.x builds failed to compile on React Native 0.83, leaving apps on the current React Native line unable to add the SDK. Compatibility is restored across React Native 0.70–0.86.
  • Events now always carry the correct device identifier. In earlier builds the device identifier could be sent empty on events for returning users, affecting device-level attribution in analytics. It is now populated correctly on every event.

[react-native/2.9.1] — 2026-06-22

Distribution: npm — @loyalytics/swan-react-native-sdk@2.9.1 Platforms: iOS 13.0+ · Android API 21+ · React Native 0.70+

Fixed

  • Notification channels created with a custom sound now register correctly on Android. Creating a notification channel that specified a custom sound previously failed and left the channel uncreated; channels created without a custom sound were unaffected. Custom-sound channels are now created as expected.
  • Carousel notification text is now readable on dark notification shades. Carousel push notifications previously used hardcoded dark text that became unreadable when the OS drew the notification shade in dark mode; the text now adapts to the light or dark shade.

[react-native/2.9.0] — 2026-06-16

Distribution: npm — @loyalytics/swan-react-native-sdk@2.9.0 Platforms: iOS 13.0+ · Android API 21+ · React Native 0.70+

Added

  • Runs on both the legacy and the new React Native architecture. Host apps that have the new architecture enabled (TurboModule + Fabric) and host apps that remain on the legacy bridge are both supported. The SDK matches the host app's architecture automatically; no SDK configuration is required and existing integrations continue to work unchanged.
  • networkStateChanged event. Subscribe via addListener('networkStateChanged', …) to be notified when device connectivity changes; the listener receives { online: boolean } on every transition between online and offline.

Fixed

  • Logging out now starts a fresh anonymous identity. When a user who first used the app anonymously and later signed in subsequently logs out, the SDK begins a new anonymous identity instead of reusing the one that had been merged into their account on sign-in. This prevents activity after logout from being attributed to the signed-out user.

[react-native/2.8.0] — 2026-05-06

Distribution: npm — @loyalytics/swan-react-native-sdk@2.8.0 Platforms: iOS 13.0+ · Android API 21+ · React Native 0.70+

Added

  • sdk.identify(identifier, data?) — assert a known user's identity to the SDK on app launch without emitting a USER_LOGIN event. Idempotent and safe to call on every cold start where the host app already has an active session. Use login(...) from your credential-submit handler (which still emits USER_LOGIN); use identify(...) from your bootstrap path so analytics counts stay clean across app upgrades and re-installs. Returns { CDID, profileSwitched }; transient network errors are swallowed and a stale identity is returned so callers don't need a try/catch in normal operation.

Fixed

  • Foreground and background push handlers fall back to notification.title / notification.body when the FCM data.title / data.body fields are absent, eliminating notifications that displayed with blank content for campaigns that only populated the notification envelope.

Changed

  • Default Android notification channel display name renamed from "Swan Notifications" to "Notifications". The channel ID swan_notifications is unchanged, so existing user notification preferences persist across the rename.

On this page