flutterselligent_beta 1.0.0
flutterselligent_beta: ^1.0.0 copied to clipboard
Mobile SDK to integrate Push Notification and InApp Message features into your Flutter mobile app
Marigold Engage-Flutter (flutterselligent) #
This module provides an API for the usage of the Marigold Engage Mobile SDKs in Flutter.
Marigold Engage-Flutter Integration #
This module supports the following SDK and tools:
| SDK | Version |
|---|---|
| Android SDK | 4.7.0 |
| iOS SDK | 3.8.6 |
| Flutter | 3.3.0 |
| Flutter SDK | 3.7.0 |
Installation #
Please refer to our SDK full documentation for a step-by-step guide on how to use the SDK, after installation.
-
Run this command with Flutter
flutter pub add flutterselligentAlternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
To update to a newer version, you can run the following command
flutter pub upgrade -
Create a
selligent.jsonfile (name is case sensitive) in the root of the Flutter project (you can alternatively place it inside another folder or inside aselligentfolder which will automatically be checked by the wrapper) with the following content:{ "url": "someMobilePushUrl", "clientId": "someClientId", "privateKey": "somePrivateKey", "fullyQualifiedNotificationActivityClassName": "com.some.project.MainActivity", "appGroupId": "group.yourgroupname", "enableiOSLogging": 56, "enableAndroidLogging": true }
Check all the options that can be used in our SDK full documentation
iOS Specific installation #
-
Drag and drop the
selligent.jsonyou created (or the full folder(s) containing it) to the Xcode project inside theCopy Bundle ResourcesinBuild phasesof your target:Do not check the "copy if needed" option to make sure you only have to manage one selligent.json file
-
Start the SDK in the
AppDelegateimport Flutter import UIKit import FlutterSelligentMobileSDK @main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) FlutterSelligent.configureWithLaunchOptions(launchOptions ?? [:]) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } }
Android Specific installation #
-
Create a Google application following the section Creating a Google application of the Android - Using the SDK pdf, and place the
google-services.jsonfile in theandroid/appfolder. -
Add the following in the
android/build.gradle.ktsfile:buildscript { repositories { google() mavenCentral() } dependencies { classpath("com.google.gms:google-services:4.4.0") } } -
Add the following in the
android/app/build.gradle.ktsfile (at the bottom):apply(plugin = "com.google.gms.google-services") -
Create a
MainApplication.ktfile next to theMainActivity.ktand configure the SDK (make sure theandroid:namein theAndroidManifest.xmlpoints to.MainApplication):import android.app.Application; import com.selligent.flutterselligent.FlutterselligentPlugin import android.util.Log; class MainApplication : Application() { override fun onCreate() { super.onCreate() FlutterselligentPlugin.configure(this) } } -
Enable
Buildconfigin thegradle.propertiesat project level:android.defaults.buildfeatures.buildconfig=true