-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(messaging,ios): add notification extension service to support im… #4085
feat(messaging,ios): add notification extension service to support im… #4085
Conversation
…age in notification, solves invertase#4016
#import "RNFBMessaging+UNNotificationServiceExtension.h" | ||
#import "FirebaseMessaging.h" | ||
|
||
API_AVAILABLE(ios(10.0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting - I had thought RNFB moved to iOS10 as a minimum but it still supports 9 right now: https://github.com/invertase/react-native-firebase/blob/master/packages/messaging/RNFBMessaging.podspec#L28 - it's Notifee and React-Native itself (with version 0.63) that have moved to 10 already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will be the first to admit my Objective-C skills are weak but assuming the tests pass, this looks good to me at least. I'll see if I can get someone else to review it as well.
Are there any corresponding docs changes needed? Those are built from source as well (edit button at top right of every page) but I haven't used this feature in my work project so I'm not familiar (sorry)
It's mostly Xcode boilerplate adapted with Firebase. For sure, having another set of eyes is always good. I don't believe so as it doesn't involve any setup. The only thing I can think of that might need documenting is the instance for sending an image with the admin SDK. In that case we could cross reference with the official docs https://firebase.google.com/docs/cloud-messaging/ios/send-image. Let me know if you need me to add it. |
Code LGTM. Re the docs, could maybe briefly mention it on this page: https://rnfirebase.io/messaging/server-integration#send-messages-to-topics - happy for this to be in a follow up PR if you want to ship this for now. |
… images (invertase#4085) Co-authored-by: Mike Hardy <[email protected]>
Fixes #4016
Description
This PR adds support for an image in FCM. It uses a Notification Extension Service but without creating a target.
The necessary files were added to the RNFBMessaging project folder.
The original solution can be seen on this thread. From that idea (which worked well for v5) I added the equivalent implementation to work with v6.
Any feedback is appreciated.
Related issues
#4016
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
iPhone 11 - iOS 13.6.1
iPhone 6 - iOS 12.4.8
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter🔥