@loyalytics/swan-react-native-sdk
v2.5.0
Published
React Native SDK for Swan
Downloads
1,673
Readme
Swan React Native SDK
⚠️ PROPRIETARY SOFTWARE: This SDK is proprietary software owned by Loyalytics. It requires a valid commercial license for use. See LICENSE for terms.
Installation
Note: This package is available via npm for authorized customers only. Installation requires a valid commercial license agreement with Loyalytics.
npm install @loyalytics/swan-react-native-sdkOr using yarn:
yarn add @loyalytics/swan-react-native-sdkUsage
import SwanSDK from '@loyalytics/swan-react-native-sdk';
// Initialize SDK
const sdk = SwanSDK.getInstance('YOUR_APP_ID', {
isProduction: false,
pushNotifications: {
enabled: true,
autoRequestPermission: true,
},
isProduction: true,
});
// Track events
sdk.productViewed({ productId: '123' });
// Listen for SDK events
sdk.on('initialized', () => {
console.log('SDK initialized!');
});iOS Notification Extension
To support Rich Media (Images) and Delivery Tracking (even when the app is killed), you must set up a Notification Service Extension.
We provide an automated tool and a guide to help you set this up.
node ./node_modules/@loyalytics/swan-react-native-sdk/scripts/setup-ios-extension.jsLicense
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software is strictly prohibited.
Copyright © 2025 Loyalytics. All Rights Reserved.
For licensing inquiries, contact: [email protected]
See the LICENSE file for full terms.
Made with create-react-native-library
