Migration to 3.x

Netmera Flutter SDK 3.x.x aligns the iOS layer with the Swift-based Netmera SDK and includes Dart API updates. The Objective-C–based iOS SDK is scheduled to become legacy as of October 2026; Flutter apps should move the native layer to the new flow.

Notation: Lines prefixed with - are removed or show the old form; lines prefixed with + are added or show the new form. For larger blocks, the line before the block uses Remove / Add / Replace.

1) Installation and project setup

1.1 pubspec.yaml

Replace

- netmera_flutter_sdk: 2.x.x
+ netmera_flutter_sdk: ^3.x.x

1.2 iOS configuration file

For compatibility with the Swift Netmera SDK, use **Netmera-Config.plist** (or equivalent), target membership, and extension setup as described in the Netmera iOS documentation (main app and Notification Extension targets where applicable).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>sdk_params</key>
        <dict>
            <key>app_group_name</key>
            <string>group.com.netmera.flutter</string>
            <key>api_key</key>
            <string>your_api_key</string>
        </dict>
    </dict>
</plist>

2) iOS

2.1 Podfile

Replace (Media Push / extension pod names and versions)

Add — inside post_install, after flutter_additional_ios_build_settings(target) (Swinject distribution setting):

Then run pod install.

2.2 AppDelegate.swift

Add — imports

Replace — class declaration (NetmeraPushDelegate moves to a separate extension)

Remove — manual bridge when opening a push from a force-quit app via launchOptions

Remove

Note: If your media push setup requires an App Group, configure it in Netmera-Config.plist or wherever the Swift SDK expects it; in this example the setAppGroupName call is removed.

Add — in didFinishLaunching (if you use Firebase, keep the delegate line; if not, you may remove the UNUserNotificationCenter line)

Remove — push token and remote notification bridge handlers

Remove — tap / dismiss handling that calls FNetmeraService.handleWork (didReceive response)

Remove — legacy willPresent (only .alert + handleWork)

Add — if you use Firebase, add the new willPresent (presentation options; no handleWork)

Add — if you use onWidgetUrlTriggered

2.3 Runner-Bridging-Header.h

Objective-C headers are no longer required for the Swift bridge.

Remove

2.4 Media Push

Update the following files as shown.

NotificationService.swift

NotificationViewController.swift

Note: Enable the App Groups capability on your Notification Service Extension target if required by your setup.

Notification Service Extension Configuration

You must update the NSExtensionPrincipalClass value in your Service Extension's Info.plist file:

Ensure your NSExtensionPrincipalClass is updated from NotificationService to $(PRODUCT_MODULE_NAME).NotificationService.

Note: Please double-check your configuration against our Media Push Guide - Step 6 to ensure media content and push notifications are handled correctly during the transition.

3) Dart

3.1 User identification

Replace — use identifyUser and updateUserProfile instead of updateUser

For more detail, see the official Netmera / package documentation for your SDK version.

4) Removed methods

  • Netmera.updateUser

  • Netmera.updateUserAsync

  • Netmera.setApiKey

  • Netmera.setBaseUrl

  • Netmera.skipAppConfigAndSetBaseUrl

  • Netmera.handleLastMessage

iOS native: FNetmera.initNetmera

5) Function Mapping

2.x and below
3.x and above
Description

Netmera.updateUser and Netmera.updateUserAsync

Netmera.identifyUser and Netmera.updateUserProfile

User identification and profile updates

Netmera.setBaseUrl and Netmera.skipAppConfigAndSetBaseUrl

Please use Netmera-Config.plist and FNetmeraConfiguration

Change base url at runtime

Netmera.setApiKey

Please use Netmera-Config.plist and FNetmeraConfiguration

Change API key at runtime

Netmera.setAppGroupName

Please use Netmera-Config.plist and Define in Signing & Capabilities

iOS Rich Media Push

Netmera.turnOffSendingEventAndUserUpdate

Netmera.startDataTransfer and Netmera.stopDataTransfer

Data transfer management

Netmera.areNotificationsEnabled

Netmera.checkNotificationPermission

Notification permission status

Last updated

Was this helpful?