-
Notifications
You must be signed in to change notification settings - Fork 4k
[firebase_messaging] iOS notification onResume, onLaunch callback not working #2011
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
Comments
Facing same issue, getting notification if app is not open on screen. 1. If app is in foregroundI don't get notification. 2. If app is in background (Not terminated)I get notification, but on notification click unable to redirect to specific screen. 3. If app is terminatedI get notification, and on notification click i am able to redirect to specific screen. (I want this to be happen in all above cases) Here is more detail of my issue. EditThis one worked for me, now i am able to redirect user in any case. as he suggests to remove above code from swift or objective C file and it should work.
|
Was facing the same issue. Removing the swift check as mentionned by @DevarshRanpara resolved the issue. |
@AlexandreRoba @sandyara same issue exists or your comment solution working fine on firebase_messaging docs are killing dev time :( |
the same issue to me. if (@available(iOS 10.0, *)) { |
Had a similar issue -- including a minimal repo that can be used to demonstrate the erroneous behavior. Describe the bug To Reproduce
DATA='{"notification": {"body": "this is a body","title": "this is a title"}, "priority": "high", "data": {"click_action": "FLUTTER_NOTIFICATION_CLICK", "id": "1", "status": "done"}, "to": "<TOKEN>"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=AAAALOSN_jE:APA91bEl5CscNyXpHRrz9F4lJJnFTlt9_FPwEOvI54Q6dr2eSuS00rryGiEXkABdhfMSHimkHrybSh7r3kfhVlciBpO3HYPa_kyT34eg-JE3bWsUg479OQK5ANzCTpJ-bvktN1AWw9j4" Expected behavior Additional context
Note: I could not find the solution in #935 #1757 #1677 or #2011 |
Facing the same issue, I've not added the iOS 10 code in AppDelegate.swift yet not able to receive anything on onlaunch and onresume handlers. Anyone facing something similar? |
Faced the same problem - instead of |
any update on this? |
New Updates? |
Any news? This is a really blocking issue I'm facing too. 😟 |
+1 This bug is blocking the release of our product, thank you for your reactivity. |
@iapicca the fix doesn't work. Please share an update with everyone on this thread. |
In my case I've got onMessage and onResume working as expected, but onLaunch does not fire in iOS. All 3 handlers working as expected in Android. I have had a lot of issues with firebase messaging in iOS, and there are a ton of open issues about this. Is there another library that works as expected that we can use? |
in my version v1.12.13+hotfix.9 fcm not working at all. before update it works without any problem. and now it's not giving any message but local notification working only. It's terrible lots of error in every version that really sucks that's why I stopped upgrading |
has anyone worked out a fix? |
has anyone worked out a fix???????? |
I'm on firebase_messaging: ^6.0.16 onResume and onLaunch on iOS is working. It works only when I click on the notification banner, but not when I click on the app icon. Is that an expected behaviour ? Also the banner on the notification centre or lock screen wasn't showing up until I uploaded the app on Testflight. Badge wasn't showing up until I added badge: 1 on the Additional options on cloud messaging dashboard Here's my code:
|
Same problem for me, this bug is blocking the release of our product. |
Check your configuration and rebuild again
…On Thu, Jul 16, 2020 at 1:38 PM Marco Rausch ***@***.***> wrote:
Same problem for me, this bug is blocking the release of our product.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2011 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQSUSDO2GJZRSM2FNNWLXTR32U7VANCNFSM4KWSQRCQ>
.
|
The project I am working on is having the same issue and at last, we found that the root cause was due to format of the push notification is incorrect. I noticed that a lot of comments that I found from the internet asking people to put click_action inside the data content. But for my case, I put the click_action in the notification content and its works in my case. Not working example: Working example: |
Its working fine for me. I suspect some of you may not be parsing the title and body correctly on iOS and that's where the error is occurring. Try using this code:
|
Hai @MobileMon , |
It's now working well thanks to you buddy. |
Did you find how to parse only the data message? I'm also facing the same issue. |
This is how we should parse the data message. |
Strange one indeed this.
All working as expected.
Receiving notification (in tray) in both instances when app is not in foreground.
Notifications are not visible in tray (expected behaviour). Anyone had any luck with this one yet? I'll keep plugging away. |
Hey @sandyara, we're a few major versions removed since you raised this issue; |
Hey @sandyara. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
We Tried creating notification in our flutter application and found it to be working perfectly fine in Android devices. When it comes to iOS device we are getting the notifications when the app is in the background or when it is not open, but on clicking them we aren't taken to the respective screens which are because the callbacks aren't called. Kindly help to fix this issue.
Versions Used:
Flutter: 1.12.13+hotfix.8
firebase_messaging: 6.0.9
Minimum iOS version supported: 10.0
To Reproduce
Steps to reproduce the behavior:
Created APNs Auth Key and Configured in Firebase
Enabled Capabilities
Added below code in AppDelegate.m
if (@available(iOS 10.0, *)) {
[UNUserNotificationCenter currentNotificationCenter].delegate = (id) self;
}
Added below code in main.dart for listening onResume and onLaunch callbacks
Note: I could not find the solution in #935 #1757 #1677 #23293
The text was updated successfully, but these errors were encountered: