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, and
- the event is a tap (not a foreground delivery).
Expo also exposes motisig.trackClick(messageId, isForeground?) for manual calls.
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.