Common Push Notification concepts
🔔 Common Push Notification Concepts for REL-ID Integration
This section outlines the standard push notification mechanisms REL-ID leverages for mobile platforms including Android, iOS, Cordova, and React Native. REL-ID uses native push services: Firebase Cloud Messaging (FCM) for Android and Apple Push Notification Service (APNS) for iOS.
📱 Platform-wise Setup Summary
Step | Android | iOS | Cordova | React Native |
---|---|---|---|---|
Register for Push Notification Services | Firebase Android Setup | APNS Registration | Cordova Android: Setup; Cordova iOS: PushNotificationIOS | Android: RN Firebase Token; iOS: Pu: shNotificationIOS |
Access Device Token | Token Sample | Registering with APNS | Cordova Plugin API | Android: RN Access Device Token; iOS PushNotificationsIOS |
Receive Push Notification | Receive Notification | Handling Notifications | onNotification Callback | Receiving Notifications; iOS: PushNotificationsIOS |
📱 FCM for APNs
When integrating Firebase Cloud Messaging (FCM) on iOS devices, FCM relies on Apple Push Notification service (APNs) under the hood. Developers must fetch the FCM token, which internally leverages the APNs token for registration.
Use the following methods based on your development platform:
Platform | Method | Behind the Scenes |
---|---|---|
Flutter | FirebaseMessaging.instance.getToken() | Gets FCM token via APNs internally |
iOS Native | Messaging.messaging().fcmToken | APNs token is exchanged for FCM token |
React Native | messaging().getToken() (via @react-native-firebase ) | Same behavior as native iOS |
Cordova | FirebasePlugin.getToken() (via cordova-plugin-firebase ) | APNs token is requested and exchanged for FCM token |
✅ This ensures proper device registration for receiving push notifications through Firebase Cloud Messaging.
📌 Additional Notes
- The SDK issues a
getDeviceToken
callback on launch. - Device token must be obtained via FCM/APNS and passed to SDK.
- Push notifications serve as a trigger, the actual content is fetched using
getNotifications()
API. - REL-ID does not bypass native systems; it builds on them with enhanced verification logic.
🔗 Useful Links
Updated about 2 months ago