Appearance
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 startNative setup
- Android: register
WingBlazeRnPackage()inMainApplication, plus the Firebase /WingBlazeMessagingServicesetup from the Android SDK. - iOS: pod from
engage-react-native.podspec; in your AppDelegate forwarddidRegisterForRemoteNotificationsWithDeviceTokentoWingBlazeRn.didRegisterForRemoteNotifications(_:)and notification taps toWingBlazeRn.handleNotificationResponse(_:).
Using Expo? Use @wingblaze/expo instead — the config plugin does this wiring for you.