If you have multiple apps, pass the optional appIdentifier named parameter to init so that the app's sessions, user data, and push notification targeting are attributed to the correct app.
This parameter is available on Flutter SDK 5.3.0 or higher.
App identifier format
Your app identifier is provided by Insider One. It must follow these rules:
Only lowercase letters (a-z), digits (0-9), and underscores (_).
Must start with a lowercase letter or a digit.
At most 50 characters. Pattern: ^[a-z0-9][a-z0-9_]{0,49}$
Bundle-identifier style values such as com.acme.myapp are not valid.
An invalid app identifier does not block initialization. The SDK logs a warning, ignores the value, and initializes as if no app identifier was passed. In that case, the app's data is attributed to the partner's default app.
The following table shows the data type for the method's parameters.
Parameter | Data Type | Description |
|---|---|---|
partnerName | String | Your partner name provided by Insider One. |
appGroup | String | Your iOS App Group, e.g., group.com.your-company.your-app. |
callback | Function | The (int actionType, dynamic data) callback handler. |
appIdentifier | String? (optional, named) | Your app identifier provided by Insider One. Must match ^[a-z0-9][a-z0-9_]{0,49}$. |
Method signature
Future<void> init(
String partnerName,
String appGroup,
Function callback, {
String? appIdentifier,
})Method example
import 'package:flutter_insider/flutter_insider.dart';
Future<void> initInsider() async {
await FlutterInsider.Instance.init(
"your_partner_name",
"group.com.your-company.your-app",
(int type, dynamic data) {
// Handle Insider callbacks.
},
appIdentifier: "your_app_identifier",
);
}Initialization behavior
A null or empty appIdentifier is ignored, and the SDK initializes exactly as without it. Existing init calls compile and work unchanged.
The plugin passes the value to the native SDKs, which validate it. An invalid value is logged and ignored, and initialization still completes.
Calling reinitWithPartnerName with a different partner name clears the app identifier on both platforms. Calling it with the same partner name keeps it.