Migration and cross-SDK parity
API map across iOS, Android, and Expo for MotiSig client SDKs.
This page collects the cross-SDK API map for MotiSig (iOS, Android, Expo) and the rules the iOS SDK follows for breaking changes. For SemVer specifics, 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
- iOS:
MotiSig.initialize(...),MotiSig.shared.setUser(id:),MotiSig.shared.logout() - Android:
MotiSig.initialize(context, sdkKey, projectId, baseURL, logLevel, pingIntervalSeconds),MotiSig.getInstance().setUser(id),MotiSig.getInstance().logout() - Expo:
await motisig.initialize({ sdkKey, projectId, baseURL?, easProjectId?, ... }),await motisig.setUser(id),await motisig.logout()
User profile
- iOS / Android:
updateUser(firstName:, lastName:, email:)—nil/nullfields are omitted. - Expo:
await motisig.updateUser({ firstName?, lastName?, email? }).
Tags, attributes, events
- All three:
addTags,removeTags,setAttributes(Expo:addOrUpdateAttributes),removeAttributes,ping,triggerEvent. - iOS:
triggerEventaccepts a completion that deliversResult<String, Error>on the cooperative pool. - Android:
triggerEventaccepts a(Result<String>) -> Unitcallback that runs on the main thread. - Expo:
triggerEventreturns aPromise<string>that resolves to the servermessage.
Push subscription
- iOS: APNs token,
pushType: "apns",devicePlatform: "ios". - Android: FCM token,
pushType: "fcm",devicePlatform: "android". - Expo: Expo push token,
pushType: "expo",devicePlatform: "ios" | "android".
permission (granted / declined / unknown) and enabled (customer flag) semantics are identical across platforms.
Notification listeners
- iOS:
addNotificationListener(_:order:)returnsMotiSigNotificationSubscription(held weakly). - Android:
addNotificationListener(listener, order?)returnsMotiSigNotificationSubscription(held weakly). - Expo:
addListener(fn)emitsforeground_notification,notification_response,token_refresh.
Delivered notifications
- iOS:
MotiSig.shared.fetchDeliveredNotifications()(UNUserNotificationCenter). - Android:
MotiSig.getInstance().fetchDeliveredNotifications { ... }(API 23+,NotificationManager.getActiveNotifications). - 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 (or becomes set before the queued click drains). Taps and foreground deliveries set isForeground appropriately (true for willPresent / foreground receive paths).
- iOS / Android / Expo: clicks go through a persistent FIFO with deduplication by
messageIdand exponential backoff on transient failures. - Expo: install
@react-native-async-storage/async-storagefor the click queue (and persisted user id) to survive process death; otherwise the queue is in-memory for the current session only. - Expo: optional
clickRetryoninitialize(maxAttempts,baseDelayMs,maxDelayMs).
Expo and iOS also expose trackClick for manual calls; Android exposes trackClick(messageId, isForeground?, completion?).
Image payload contract
The image URL key resolution is identical across iOS, Android (example helper), and the Expo NSE:
_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 will light up the banner image on every platform that has the right delivery setup. See Rich notification images.
Release notes for the Swift package: CHANGELOG.