Preview: the PushFleet API isn't live yet. Join the waitlist
React Native
The React Native SDK registers devices from your app with your publishable key. Sending happens from your server.
Install
Section titled “Install”Add the package, then run pod install in ios/:
npm install @pushfleet/react-nativeRegister
Section titled “Register”The library asks Apple or Firebase for the token itself, on iOS and Android, so you only pass your user ID.
import PushFleet from "@pushfleet/react-native";
PushFleet.configure({ publishableKey: "pf_pub_test_…" });
await PushFleet.register({ userId: "user_8f3k" });Calling register on every launch is safe: the same token updates instead of duplicating.
Live mode
Section titled “Live mode”In live mode, pass a user token your server signed for the signed-in user. See identity verification.
await PushFleet.register({ userId: "user_8f3k", userToken });