Flutter-first initialization
Reteno now supports a Flutter-first setup flow where the SDK is initialized from Dart.
await Reteno().initialize(
accessKey: '<your_access_key>',
options: RetenoInitOptions(
lifecycleTrackingOptions: LifecycleTrackingOptions.all(),
),
);Reteno().initWith(...) remains available as a backward-compatible alias, but initialize(...) is the recommended setup.
Android migration notes
If your app has Reteno-only native wiring from older versions, remove it:
- Remove custom
FirebaseMessagingServiceclasses that were added only for Reteno. - Remove Reteno-specific
MESSAGING_EVENTservice declarations from app manifest. - Remove legacy native Reteno bootstrap if it was used only for Flutter plugin setup.
The plugin now registers Reteno messaging bridge service from the plugin manifest.
If your app must keep custom FCM service
Some apps already have business logic inside custom FirebaseMessagingService.
In this case:
- Keep a single app-level
MESSAGING_EVENTservice. - Make that service inherit from
RetenoFirebaseMessagingService. - Call
super.onNewToken(...)andsuper.onMessageReceived(...). - Remove plugin bridge service in app manifest with
tools:node="remove".
Use Reteno().diagnose() to catch configuration problems:
FCM_MESSAGING_SERVICE_MISSINGRETENO_MESSAGING_SERVICE_MISSINGFCM_MESSAGING_SERVICE_CONFLICTFCM_TOKEN_MISSINGFCM_TOKEN_FETCH_FAILED
iOS migration notes
If your app previously initialized Reteno from AppDelegate, move initialization to Flutter:
- Remove manual
Reteno.start(...)fromAppDelegate. - Keep required Notification Service Extension + App Group setup from native iOS guide.
- If you use carousel or GIF push UI, also add
NotificationContentExtension. - Call
Reteno().initialize(...)from Flutter startup. - Use
Reteno().requestPushPermission()to request permission and register for remote notifications.
NotificationServiceExtension + App Group remain mandatory for full iOS Reteno push behavior. NotificationContentExtension is additionally required for carousel/GIF push UI.
Verify migration
Run diagnostics after initialization:
final issues = await Reteno().diagnose();Expected result is [].
If not empty, inspect returned issue codes and resolve integration conflicts first.
