Framework Recipes

Ready-made push setups for Swift (native iOS), Kotlin and Jetpack Compose (native Android), bare React Native, Expo and Flutter — the packages to install, getting the token, registering it, and showing Android pushes.

Every language and framework follows the same four steps — only "get the token" changes:

1

Get the platform token

  • iOS: the APNs device token (hex string) from your app delegate.
  • Android: the FCM registration token.
  • Web: the browser's PushSubscription — see Web Push.

Whichever library hands you the token is fine — APNs directly on iOS, FCM's SDK on Android, firebase_messaging on Flutter, expo-notifications' getDevicePushTokenAsync() in an Expo development build.

2

Register it with a stable deviceId

POST https://app.nativenotify.com/api/universal/device/register

Send the token in tokens.apnsToken (iOS) or tokens.fcmToken (Android) with platform ("ios" / "android") and a deviceId you persist across launches — the Quickstart has a minimal example per platform, and Device Registration is the full contract.

3

Save the app's push credentials

The FCM service account (Android) and Apple .p8 key (iOS) your sends go out with — Push Credentials.

4

Verify, then send

Prove one device with a test send, then send to an audience — every registered device (all), a device list, a subscriber list or a group. See Send Notifications.

Android shows nothing on its own:

Native Notify's Android pushes are FCM data messages (title, message, and body = your pushData as JSON). A native Kotlin, bare React Native or Flutter app must post the notification itself from its message handler — each recipe shows how. A test send reports accepted either way, because FCM accepted the message.

Recipes

FrameworkToken sourceRecipe
Swift (native iOS)UIApplicationDelegate + APNsSwift recipe
Kotlin (native Android)FirebaseMessagingKotlin recipe
Jetpack Compose (Android)FirebaseMessaging + rememberLauncherForActivityResultJetpack Compose recipe
Bare React Native@react-native-firebase/messaging / APNs delegateBare React Native recipe
Expo (React Native)expo-notifications (a development build)Expo recipe
Flutterfirebase_messagingFlutter recipe
Web (browsers)PushManager.subscribe()Web Push recipe

Anything not listed — .NET, Unity, a KMP app, a backend that holds device tokens — registers with the same JSON contract. Start from the Quickstart or Device Registration.