suprsend_flutter_sdk is used to integrate SuprSend features like Mobile Push, Preferences and InApp feed into your Flutter application. 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.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
All SuprSend SDK methods returnSSResponse. Use it to check whether a call succeeded and to read error details when it didn’t.