Skip to content

React Native SDK

@wingblaze/react-native bridges to the native WingBlaze SDKs — the TS layer is validation + promise marshaling.

ts
import { WingBlaze } from "@wingblaze/react-native";

await WingBlaze.init({ appId: "…", apiUrl: "https://api…", ingestUrl: "https://ingest…" });
const ids = await WingBlaze.enablePush();
await WingBlaze.login("user-123");
await WingBlaze.addTags({ plan: "pro" });
await WingBlaze.trackEvent("purchase", { amount: 42 });

const unsubscribe = WingBlaze.addDeepLinkListener((link) => navigate(link)); // warm start
const coldStart = await WingBlaze.handleInitialNotification();               // Android cold start

Native setup

  • Android: register WingBlazeRnPackage() in MainApplication, plus the Firebase / WingBlazeMessagingService setup from the Android SDK.
  • iOS: pod from engage-react-native.podspec; in your AppDelegate forward didRegisterForRemoteNotificationsWithDeviceToken to WingBlazeRn.didRegisterForRemoteNotifications(_:) and notification taps to WingBlazeRn.handleNotificationResponse(_:).

Using Expo? Use @wingblaze/expo instead — the config plugin does this wiring for you.

Data hosted in Southeast Asia (asia-southeast1).