Skip to main content
Most core methods return a Promise. Await them when you need to sequence work after the native call completes.

Core SDK

Zixflow.initialize(config: ZixflowConfig): Promise<void>

When to use: Once at app startup (root useEffect). On Android this also registers the push module; on iOS you still initialize MessagingPush in AppDelegate.

Zixflow.identify(params: IdentifyParams): Promise<void>

When to use: After login or when you know the user. Provide userId, traits, or both. Required before targeted push.

Zixflow.clearIdentify(): Promise<void>

When to use: On logout. Pair with deleteDeviceToken() so the device stops receiving that user’s pushes.

Zixflow.track(name: string, properties?: Record<string, any>): Promise<void>

When to use: Custom product analytics events (button clicks, purchases, etc.).

Zixflow.screen(title: string, properties?: Record<string, any>): Promise<void>

When to use: Screen views (manual or React Navigation listener).

Zixflow.setProfileAttributes(attributes: Record<string, any>): Promise<void>

When to use: Update traits on the identified user without a full re-identify.

Zixflow.setDeviceAttributes(attributes: Record<string, any>): Promise<void>

When to use: Attach attributes to the current device (app version, theme, etc.).

Zixflow.registerDeviceToken(token: string): Promise<void>

When to use: Manually register an FCM/APNs token (usually automatic after native push setup; use on token refresh in custom FCM flows).

Zixflow.deleteDeviceToken(): Promise<void>

When to use: Logout or when the user disables notifications.

Zixflow.trackMetric(params): Promise<void>

When to use: Manual push metrics when you are not on the default auto-tracking path, or to record Converted after a goal.

Push Messaging

Zixflow.pushMessaging.showPromptForPushNotifications(options?): Promise<ZixflowPushPermissionStatus>

When to use: Request OS notification permission (iOS prompt; Android 13+ POST_NOTIFICATIONS).

Zixflow.pushMessaging.getPushPermissionStatus(): Promise<ZixflowPushPermissionStatus>

When to use: Check current permission without prompting.

Zixflow.pushMessaging.getRegisteredDeviceToken(): Promise<string>

When to use: Read the token the SDK has registered (debug, support, or re-register flows).

Zixflow.pushMessaging.onMessageReceived(message, handleNotificationTrigger?): Promise<boolean>

When to use: Android — process an FCM message your app received in JS (foreground). Displays and/or tracks. On iOS this resolves to true without additional work.

Zixflow.pushMessaging.onBackgroundMessageReceived(message): Promise<boolean>

When to use: Android background FCM helper around onMessageReceived (avoids double-display when FCM already showed a notification).

Zixflow.pushMessaging.trackNotificationReceived(payload): void

When to use: iOS custom pipelines — mark delivery. No-op on Android (auto via FCM module).

Zixflow.pushMessaging.trackNotificationResponseReceived(payload): void

When to use: iOS custom pipelines — mark open/tap. No-op on Android.

Location

Enable the native location module first (Location Tracking).

Zixflow.location.setLastKnownLocation(latitude: number, longitude: number): void

When to use: Supply coordinates from your own location provider (MANUAL mode).

Zixflow.location.requestLocationUpdate(): void

When to use: Ask the SDK to refresh location when the module is enabled.

Types

ZixflowConfig

ZixflowLogLevel

ScreenView

ZixflowLocationTrackingMode

MetricEvent

Use Converted when the user completes a post-open goal you want attributed to the push campaign.

PushClickBehaviorAndroid

ZixflowPushPermissionStatus

Guides