Version: 2.3.0 Platform: React Native (iOS & Android) Last Updated: February 2026
The Swan React Native SDK empowers your e-commerce application with enterprise-grade analytics, user engagement, and push notification capabilities.
Install the Swan SDK package using npm or yarn:
npm install @loyalytics/swan-react-native-sdk
# or
yarn add @loyalytics/swan-react-native-sdk
The SDK relies on industry-standard libraries for core functionality. Install them in your project:
# Core dependencies for Push Notifications and Network handling
npm install @react-native-firebase/app @react-native-firebase/messaging @notifee/react-native @react-native-community/netinfo @react-native-async-storage/async-storage react-native-device-info react-native-sqlite-2
# or
yarn add @react-native-firebase/app @react-native-firebase/messaging @notifee/react-native @react-native-community/netinfo @react-native-async-storage/async-storage react-native-device-info react-native-sqlite-2
Permissions: Open android/app/src/main/AndroidManifest.xml and add the following permissions:
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <!-- Android 13+ -->
<application ...>
<!-- ... -->
</application>
</manifest>
<aside> ℹ️
Location permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION) are only required if you enable location services in your SDK config (location: { enabled: true }). You can safely omit them if your app doesn't use location tracking.
</aside>