Package: @loyalytics/swan-react-native-sdk • Platforms: iOS & Android • Last Updated: May 2026
For integration steps and API reference, see the Swan React Native SDK Integration Guide.
Status: latest on npm. Recommended upgrade for all integrators.
Fixes a post-upgrade identity issue: customers who were signed in on an older SDK build appeared as anonymous to the SDK after upgrading, even though the host app still had them logged in. Result: logged-in users were receiving guest-segment pushes instead of personalized ones. v2.8.0 introduces sdk.identify() so host apps can re-assert a known identity on every app launch without firing a phantom USER_LOGIN event.
| Change | Type |
|---|---|
sdk.identify(identifier, data?) — new public API for re-asserting a known user on app launch |
feat (headline) |
| Legacy push payload fallback (foreground + background handlers) — fixes blank "Notification / New message" pushes | fix |
Default Android channel name: Swan Notifications → Notifications |
chore (drop Swan branding from end-user UI) |
The Android channel ID swan_notifications is unchanged, so user notification preferences persist across the rename.
In your app bootstrap, when you have a stored session for the user, call:
await sdk.identify(mobile, { /* optional profile data */ });
Continue to use sdk.login(...) only inside your credential-submit handler — not on every app launch. Using login() on launch fires a phantom USER_LOGIN event each time and pollutes analytics.
Do not install. v2.7.3 was a semver-correction issue: the changes it shipped warranted a minor bump, not a patch. The same code was republished as v2.8.0 to keep the public version contract honest. If you currently have ^2.7.3 pinned, move to ^2.8.0.
The previous major release. Focus: Android 13 carousel reliability.