-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[firebase_messaging] FCM messaging using Flutter does not work on iPhone, but it works fine on Android device #2885
Comments
Hi @kingdragon2108
When app is in foreground, it will call
You should move your log into onResume Code Sample
|
Thanks for your feedback. I replaced the main.dart file by above sample file and implemented it on two simulators. (the settings in relation to push notification on IOS keeps the same.) I am getting one exception for the firebase_messaging as following: MISs-Mac:myschoolapp_frontend mis$ flutter run -d all Launching lib/main.dart on iPhone 8 in debug mode... Running Xcode build... ├─Assembling Flutter resources... 8.4s Running Xcode build... ├─Assembling Flutter resources... 5.7s
I can't make sure whether the sample codes works fine or not. |
Hi @kingdragon2108 This is because of configuration problem, please add your plist file from firebse and add firebase in your
and many more things to add to make it proeprly pleae check https://pub.dev/packages/firebase_messaging#ios-integration |
Hello Tesser Thank you for your reply. Before few months I added the GoogleService-info.plist to project and today i added firebace to AppDelegate.swift. Then the App is crashed. So i am going to share the project codes with you. Best Regards |
@kingdragon2108 |
`void initialize() async { showNotification() async { Future onDidReceiveLocalNotification( Future myBackgroundMessageHandler(Map<String, dynamic> message) async { String val = message['data']['message']; var androidPlatformChannelSpecifies = new AndroidNotificationDetails( await flutterLocalNotificationsPlugin.show( Future onDidReceiveLocalNotification( |
Try this for background messaging. This is works for me. |
Hey @kingdragon2108. 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! |
Since there haven't been any recent updates here, I am going to close this issue. @kingdragon2108 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
FCM works in the background of my app. I followed the documentation to integrate firebase messageing. See my flutter version below. When I test on a simulator, I get all notifications. What could be the issue? [✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.4 19E266, locale en-CA) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.1) |
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs and the output of |
I built the flutter live_chat app using plugin "firebase_messaging: ^5.1.8". The app uses topic notification for the live chatting. it works fine on android devices but does not work on iphones. if the sender sends the notification to ipone device ( or from cloud messaging in firebase project sends the notification), the receiver can see the push notification in his iphone device but the callback function in app to receive the notification does not work. I upgraded the version of "firebase-messaging" plugin from "^5.1.8" to "^6.0.9" but the issue is same.
The following is the main class for FCM messaging.
Flutter doctor
Please help me from this issue.
Best Regards
The text was updated successfully, but these errors were encountered: