Migration and cross-SDK parity
API map across Android, iOS, and Expo for MotiSig client SDKs.
This page collects the cross-SDK API map for MotiSig (Android, iOS, Expo) and how behavior lines up across platforms. For Android SemVer and wire-format rules, see Versioning.
Public API parity
The three SDKs expose the same product surface, with platform-idiomatic naming. Use this list when you port an integration between platforms.
Lifecycle
- Android:
MotiSig.initialize(context, sdkKey, projectId, baseURL?, logLevel, pingIntervalSeconds, skipPermissionRequest?, skipNotificationListeners?)returnsBoolean;MotiSig.getInstance().reset()clears local state without server logout;MotiSig.getInstance().setUser(id, register?, completion?),getUser { … },trackClick,MotiSigAPIClient,onFcmTokenChange,logout() - iOS:
MotiSig.initialize(...) -> Bool,MotiSig.shared.reset(),MotiSig.shared.setUser(id:register:completion:),getUser(),trackClick,MotiSigAPIClient,onApnsTokenChange,logout() - Expo:
await motisig.initialize({ sdkKey, projectId, baseURL?, easProjectId?, ... }),await motisig.setUser(id),await motisig.logout()
User profile
- Android / iOS:
updateUser(firstName?, lastName?, email?)—null/nilfields are omitted. - Expo:
await motisig.updateUser({ firstName?, lastName?, email? }).
Tags, attributes, events
- All three:
addTags,removeTags,setAttributes(Expo:addOrUpdateAttributes),removeAttributes,ping,triggerEvent. - Android:
triggerEventaccepts a(Result<String>) -> Unitcallback that runs on the main thread. - iOS:
triggerEventaccepts a completion that deliversResult<String, Error>on the cooperative pool. - Expo:
triggerEventreturns aPromise<string>that resolves to the servermessage.
Push subscription
- Android: FCM token,
pushType: "fcm",devicePlatform: "android". - iOS: APNs token,
pushType: "apns",devicePlatform: "ios". - Expo: Expo push token,
pushType: "expo",devicePlatform: "ios" | "android".
permission (granted / declined; iOS/Expo also produce unknown) and enabled (customer flag) semantics are identical across platforms.
Notification listeners
- Android:
addNotificationListener(listener, order?)returnsMotiSigNotificationSubscription(held weakly). - iOS:
addNotificationListener(_:order:)returnsMotiSigNotificationSubscription(held weakly). - Expo:
addListener(fn)emitsforeground_notification,notification_response,token_refresh.
Delivered notifications
- Android:
MotiSig.getInstance().fetchDeliveredNotifications { ... }(API 23+,NotificationManager.getActiveNotifications). - iOS:
MotiSig.shared.fetchDeliveredNotifications()(UNUserNotificationCenter). - Expo: not available. Reconcile via the
notification_responseevent when the user taps.
Click tracking
All three call POST /track/click automatically when:
- the payload contains
messageId, and - a user is set, and
- the event is a tap (not a foreground delivery).
On Android specifically, taps are detected when you forward the launcher activity intent via MotiSig.getInstance().handleNotificationIntent(intent).
Image payload contract
The image URL key resolution is identical across the iOS NSE, the Expo NSE, and the Android example helper:
_motisig.imageUrl/_motisig.image_url/_motisig.image_richContent.imagefcm_options.image- Top-level
image/imageUrl/image_url
A single server payload that uses _motisig.imageUrl lights up the banner image on every platform that has the right delivery setup. See Rich notification images.
Release notes: CHANGELOG.