Ad

Cloud Messaging For MacOS (Flutter) Not Receiving Messages

I'm trying to get my Flutter application to receive messages using Cloud Messaging. This is working great on iOS, but for my Flutter macOS application, no matter what I try it's not working.

There seems to be very little documentation online about how to do this, with even the official documentation not being particularly clear.

What I have tried:

  • Cleaning Flutter
  • Removing pods and rebuilding
  • Sending messages from both Firebase's test page as well as a Firebase Function

What I am wondering if I have got wrong:

  • In the documentation it says For iOS; you must have a physical iOS device to receive messages., does this mean I should be doing something different when running a macOS app too?
  • Where it says in the documentation, This guide applies to both iOS & macOS Flutter apps, repeat each step for the platforms you require, does it literally mean every single step, as some steps seem to be fine not being repeated eg....
  • Can I reuse the same Firebase iOS app and Apple key or do I need to create a separate Firebase iOS app and separate Apple key?
  • Can I use the same identifier as with my iOS implementation?

Thanks so much!

Ad

Answer

For anyone else trying this, it turns out that notifications shouldn't work on MacOS using the default build approach. Instead, you must use a notarized version of the app. Many thanks to Markus Aksli, who responded with the following:

No, you can just run on your mac, however you need a build that has been notarized by apple (https://github.com/FirebaseExtended/flutterfire/issues/5717)

You can use the same identifier and key

Ad
source: stackoverflow.com
Ad