suprsend_flutter_sdk is used to integrate SuprSend into your Flutter application. v3 currently ships user identification and Mobile Push; event tracking, user channel methods, and the other features of the native SDKs are not yet available in Flutter. It wraps the native SuprSend Android and iOS SDKs.
This is v3 of
suprsend_flutter_sdk. Documentation for v2 of this SDK is available here. If you are upgrading from v2, refer the migration guide.Installation
Add the SDK to yourpubspec.yaml:
Requirements: iOS 15.0+, Android minSdk 19.
ios/Podfile and then run pod install from the ios/ directory.
Integration steps
Step 1: Create client instance
Initialize the SuprSend client insidemain. All the methods of SuprSend SDK can be accessed only after creating the instance.
Step 2: Authenticate user
Authenticate the user so that all the actions performed after authenticating will be w.r.t that user. This is a mandatory step and needs to be called before using any other method. This is usually performed after successful login and on reload of the app to re-authenticate the user (can be changed based on your requirement).Step 3: Reset user
This will remove user data from the SuprSend instance, similar to a logout action.Change active tenant
Use the below method to switch the active tenant of the identified user.Logging
Add the below code inmain below the SuprSend instance creation to see logs for debugging.
API response
identify and reset return SSResponse. Use it to check whether a call succeeded and to read error details when it didn’t.