Open
Conversation
- Extract notification title and body to top-level notification field for iOS compatibility - Move Android-specific notification fields into android section - Add APNS configuration with iOS-specific alert and sound settings - Enable mutable-content for rich notifications on iOS - Maintain backward compatibility with existing Android functionality
db777a7 to
0a4258a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add iOS FCM Support via APNS Payload
Problem
The current FCM implementation only sends notifications through Android-specific payload structures, making iOS devices unable to receive push notifications when using Firebase Cloud Messaging. iOS devices require APNS (Apple Push Notification Service) configuration within the FCM message payload to properly receive and display notifications.
Solution
This PR restructures the FCM payload to support both Android and iOS platforms simultaneously by:
Extracting notification fields to top-level: The
titleandbodyare now in the top-levelnotificationobject, which FCM uses for cross-platform compatibility.Organizing platform-specific fields:
android.notificationsectionAdding iOS support: The
apnssection includes:mutable-content: 1flag to enable rich notifications on iOSChanges
payload_frommethod inlib/action_push_native/service/fcm.rbBenefits
✅ iOS devices can now receive push notifications via FCM
✅ Backward compatible with existing Android implementation
✅ Cleaner payload structure with platform-specific sections
✅ Supports rich notifications on iOS through mutable-content
Testing
google_datapayloadsBreaking Changes
None. This is backward compatible.
Checklist: