-
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
createLocalNotification() on iOS won't display notification (show_in_foreground: true set) #223
Comments
@DavideValdo The fact that you're getting As an aside, |
@DavideValdo I'm going to assume that this is no longer an issue and close it. Please let me know if that is not the case. |
I'm getting the same error from React Native on iOS:
The local message I sent is like this: {
body: 'My Notification Message',
id: '1503311359441',
local_notification: true,
show_in_foreground: true,
title: 'My Notification Title',
_notificationType: 'local_notification',
} It works fine on Android, and message from remote works on iOS too. |
I has the same issue on IOS. On android working fine. I'm using "react-native-firebase": "2.1.4","react": "16.0.0-alpha.12" and "react-native": "0.47.2", |
@Shinichi52 |
A quick hack to this issue
You may refer to full code in this branch ios-foreground-notif |
@hisokakei Your trick working well, it should be merged to new version. Thank you |
where is it documented? |
@sseyha i'm using react-native-fcm. it's working fine |
@hisokakei I've only added that flag after doing an initial build. Would I need to relink the plugin? |
@uppercase-army you need to rebuild your app to make it work as it changed native code. The change is merged to master too. You may upgrade your library to master |
The version I'm using contains the code that @hisokakei posted, still my local notification wont show up when in foreground, any ideas? this is my notification object:
|
+1 |
+1 still struggling |
Me too :/ Any ideas? It works well on Android, but not on iOS |
Guys please refer to #595 As it stands, we're re-working the entire side of messaging. |
Good news, the long awaited alpha of our messaging and notifications overhaul is now available!! Check out the release notes here: https://github.com/invertase/react-native-firebase/releases/tag/v4.0.0-alpha.1 If you have any comments and suggestions or want to report an issue, come find us on Discord |
This code works correctly on Android:
On iOS, i just get this warning from React Native:
messaging_notification_received
with no listeners registered..onMessage(message) works fine
When I build the .xcworkspace, I can get this from XCode's console:
EDIT: Added flag to plist, message disappeared but nothing changes:
Also i noticed:
Still, notifications sent by triggering FCM via cURL just work when app is in the background.
The text was updated successfully, but these errors were encountered: