Migration to 2.x
Netmera React Native SDK 2.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; React Native apps should move the native layer to the new flow.
1) Installation and project setup
1.1 package.json
Replace
- "react-native-netmera": "1.x.x"+ "react-native-netmera": "2.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.example.app</string>
<key>api_key</key>
<string>your_sdk_api_key</string>
</dict>
</dict>
</plist>2) iOS
2.1 Podfile
Replace (Media Push / extension pod names and versions)
Add — post_install block for Swinject distribution setting
Then run pod install.
2.2 AppDelegate.swift
Add — imports
Replace — class declaration (NetmeraPushDelegate moves to a separate extension)
Remove
Add
Add — in didFinishLaunching (if you use Firebase, keep the delegate line; if not, you may remove the UNUserNotificationCenter line)
Remove — manual push event forwarding via RNNetmeraRCTEventEmitter. The SDK now handles push events automatically; these methods are no longer required.
Add — if you use Firebase, add the new willPresent and didReceive (presentation options; no handleWork)
Replace — NetmeraPushDelegate (widget URL callback). Move the conformance to a separate extension and update the method signatures.
2.3 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) React Native
3.1 Push lifecycle callbacks — registration
Replace — in index.js
3.2 Push lifecycle callbacks — typed signatures
Edit NetmeraPushHeadlessTask.ts and update all callback signatures.
Replace
3.3 User identification
Replace — use identifyUser and updateUserProfile instead of updateUser
3.4 User profile attributes
Name, surname, gender, date of birth, and segments are now managed through updateUserProfile. Each attribute supports set / unset; collection attributes also support add / remove.
For more detail, see the official Netmera / package documentation for your SDK version.
3.5 Replace NetmeraPushInbox
NetmeraPushInbox model has been removed. Please use NetmeraPushObject model instead in fetchInbox and fetchNextPage.
4) Removed methods
Netmera.initBroadcastReceiverNetmera.updateUserNetmera.updateUserAsyncNetmera.areNotificationsEnabledNetmera.handleLastMessageNetmera.setApiKeyNetmera.setBaseUrlNetmera.skipAppConfigAndSetBaseUrlNetmera.turnOffSendingEventAndUserUpdate
5) Function Mapping
Netmera.initBroadcastReceiver
Netmera.setPushLifecycleCallbacks
Register push lifecycle callbacks
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 RNNetmeraConfiguration
Change base url at runtime
Netmera.setApiKey
Please use Netmera-Config.plist and RNNetmeraConfiguration
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?
