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.
networkStateChangedevent. Subscribe viaaddListener('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 aUSER_LOGINevent. Idempotent and safe to call on every cold start where the host app already has an active session. Uselogin(...)from your credential-submit handler (which still emitsUSER_LOGIN); useidentify(...)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 atry/catchin normal operation.
Fixed
- Foreground and background push handlers fall back to
notification.title/notification.bodywhen the FCMdata.title/data.bodyfields are absent, eliminating notifications that displayed with blank content for campaigns that only populated thenotificationenvelope.
Changed
- Default Android notification channel display name renamed from
"Swan Notifications"to"Notifications". The channel IDswan_notificationsis unchanged, so existing user notification preferences persist across the rename.