Flutter push notification not working in android release builds - firebase

Push notification doesn't work on android release builds, but it works on debug builds. I have generated SHA-1 keys and added debug and release SHA-1 keys in the Firebase console.

Related

Firebase, what`s the benefit of Flutter project in console instead of Android and IOS

Google recently released Flutter 3.
And at the same time, Flutter projects are now supported in the Firebase console as well. However, in the past, it was possible to register and use each Flutter project in Android IOS. What's better? I am thinking of changing

Flutter Build APK - Firebase disappear

This is the normal view that I should see, but when I build APK and install it on the phone this happens.
This is a listview of a stream builder it loads from a firestore the app works fine until the moment I try to use the APK version.

Exclude running firebase_messaging for flutter web

I'm trying to run firebase_messaging only on android and ios device, however if i put the firebase_messaging inside pubspec.yaml, and then run my flutter web it return
TypeError: Cannot read properties of undefined (reading 'messaging')
at new firebase_messaging_web.FirebaseMessagingWeb.new
And in order to run the flutter web, i must initialiseApp the firebase on web. Is there any way to run firebase_messaging only on android and ios

Cannot get Firebase working for Xamarin Forms iOS

I am using Visual Studio 2019 on Windows, developing an App using Xamarin Forms, for Android and iOS. Everything is the latest version.
I am trying to use Firebase to add Push Notification functionality. I have been able to get this functioning for the Android App, but whatever I do seems to fail / not work for iOS.
I have tried using both Xamarin.Firebase.iOS.CloudMessaging and Plugin.FirebasePushNotification with the same result. Starting from a basic app created in Visual Studio, as soon as I add the basic code for the iOS project, the app stops working and just times out after 17 seconds with running any of the project code (no breakpoints are hit).
I also tried downloading this demo app https://github.com/jfversluis/XFFCMPushNotificationsSample. I created my versions of google-services.json (Android) and GoogleService-Info.plist (iOS). The Android app runs but the iOS app does not (times out after 17 seconds).
Having tried so many different samples, examples, options, etc - I am at a complete loss as to what the issue might be. The situation is not helped by me being new to App development & Xamarin Forms!
I appreciate that I haven't added any "I tried this" code, but I'm hoping someone can help me with debugging this. Visual Studio doesn't appear to show anything, can I get more helpful info from the iPhone?
Edit:
For iOS,
I have created a Key and enabled Apple Push Notifications.
I have uploaded the key to the iOS project in Firebase (Cloud Messaging).
I have downloaded the GoogleService-Info.plist file and added it to the iOS project in Visual Studio, and set it to BundleResource
I have enabled Push Notifications in Entitlements.plist
I have enabled Background Modes & Remote Notifications in Info.plist
I am using Automatic Provisioning
I have checked that Bundle Identifier is correct
I have added FirebaseAppDelegateProxyEnabled to info.plist
EDIT 2:
I have manged to get an error message, which happens during the call to
FirebasePushNotificationManager.Initialize(options, true);
{System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.FirebasePushNotification.FirebasePushNotificationManager.Initialize (Foundation.NSDictionary options, System.Boolean autoRegistration) [0x00029] in /Users/runner/runners/2.169.1/work/1/s/Plugin.FirebasePushNotification/FirebasePushNotificationManager.ios.cs:141
at MyApp.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00014] in \MyKRing.iOS\AppDelegate.cs:34 }

How to disable iOS part of FCM unity sdk?

Im using the android part of FCM unity SDK for my game, and a standard APNs integrate for iOS platform.
So I want disable the iOS part of FCM unity sdk completely, I removed all the plugins in iOS folder, disabled cocoapod settings, but still got this error
No GoogleService-Info.plist files found in your project.
Finally I just follow the SDK guide download a GoogleService-Info.plist file from firebase console, mute the build error.
I think this is the only way to disable the iOS part currently.

Resources