FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

FirebasePushNotificationManager is missing on 3.4.25 version

Open vhugogarcia opened this issue 3 years ago • 20 comments

Hello friends,

After upgrading to the latest version (3.4.25) of the nuget pkg, I get an error on my MainApplication.cs (Android project) outlining that the FirebasePushNotificationManager is missing in the assembly.

I could not find it at all for a replacement. The using Plugin.FirebasePushNotification; is set correctly on the class file.

do you know what I could be missing?

thanks in advance

vhugogarcia avatar May 24 '22 15:05 vhugogarcia

I am facing the same issue when i tried to upgrade from version 3.1.6 to the 3.4.25 now everything is broken 💔

Luisalvarenga avatar May 24 '22 17:05 Luisalvarenga

Same on my side I'm still using 3.4.1

draganDBL avatar May 25 '22 06:05 draganDBL

Same here, i don't see anything wrong in repo though

Kemorave avatar May 26 '22 21:05 Kemorave

I am experiencing the same problem in a new project with version 3.4.25, any solution?

carlosanpardo avatar May 27 '22 22:05 carlosanpardo

Set your target version to android 12 guys

themronion avatar May 29 '22 09:05 themronion

Has anyone figured this out yet? or which version to fallback?

germanjitsr avatar Jun 22 '22 22:06 germanjitsr

I just uninstall the lastest version and instal again with the version that running well before. After that just rebuild the app and everything going fine

RyansBello avatar Jun 23 '22 12:06 RyansBello

Target android 12 sv2 (prob need to update your sdk's

jamesmcmenamin avatar Jun 28 '22 17:06 jamesmcmenamin

Target android 12 sv2 (prob need to update your sdk's

Issue is also there in iOS

nodoid avatar Aug 24 '22 09:08 nodoid

Anyone find a solution to this with IOS?

sstahurski avatar Sep 14 '22 20:09 sstahurski

Same here. (In Xamarin) Switching the Android version to 12 does not solve this. The FirebasePushNotificationManager is not showing available in the namespace of the library, on Android, in v11 or v12.

LeeWhite187 avatar Sep 19 '22 05:09 LeeWhite187

If you are having issues, Fall back to Plugin.FirebasePushNotification (3.0.3) It has that method we need and it works!

germanjitsr avatar Sep 19 '22 14:09 germanjitsr

If you are having issues, Fall back to Plugin.FirebasePushNotification (3.0.3) It has that method we need and it works!

For MAUI, even downgrading did not work for IOS. Still have the issue.

sstahurski avatar Sep 19 '22 15:09 sstahurski

This is still an issue!

dylix avatar Sep 28 '22 11:09 dylix

If you compile what is the output in the VS error list?

AlleSchonWeg avatar Sep 29 '22 13:09 AlleSchonWeg

/Platforms/iOS/AppDelegate.cs using Plugin.FirebasePushNotification; ... public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { FirebasePushNotificationManager.Initialize(launchOptions, true);

    return base.FinishedLaunching(application, launchOptions);

}

Error | CS0103 | The name 'FirebasePushNotificationManager' does not exist in the current context

VS cannot resolve or find the FirebasePushNotificationManager.

sstahurski avatar Sep 29 '22 14:09 sstahurski

FirebasePushNotificationManager.Initialize(launchOptions, true);

You are using .NET Maui. This Plugin is only for Xamarin Forms. It's because Maui needs .NET 6 and this plugin is compiled for: netstandard2.0;xamarin.ios10;monoandroid12. . You could look at the csproj : https://github.com/CrossGeeks/FirebasePushNotificationPlugin/blob/master/Plugin.FirebasePushNotification/Plugin.FirebasePushNotification.csproj You will see, that specific source code files are not included in the build for a specific platform. There is no entry for .Net 6 (net6.0-ios or .net6.0-android). As a result you see this error. .NET 6 has breaking changes for iOS (net6.0-ios). It is not compatible with XF (xamarin.ios10): https://github.com/dotnet/maui/issues/6221 https://github.com/xamarin/xamarin-macios/issues/13087

Android (.net6.0-android) is compatible with XF(monoandroid): https://github.com/dotnet/maui/discussions/1743 Thats the reason, why android shows no error. This plugin needs at least Target Android Version12 and/or TargetFrameworkVersion 12.

AlleSchonWeg avatar Sep 29 '22 16:09 AlleSchonWeg

that may be true for him, but still happens in xamarin forms. the original post of this problem still applies.

dylix avatar Sep 29 '22 16:09 dylix

that may be true for him, but still happens in xamarin forms. the original post of this problem still applies.

Have you changed the target framework version and target android version?

AlleSchonWeg avatar Sep 29 '22 17:09 AlleSchonWeg

that may be true for him, but still happens in xamarin forms. the original post of this problem still applies.

Have you changed the target framework version and target android version?

I in fact did not. How silly of me, THANK YOU!

dylix avatar Sep 29 '22 18:09 dylix

Any word from the developers as to .Net 6 or .Net 7 support? I've been a happy consumer of this plugin for my Platform.UNO apps in production for over 2 years, and now I'm stuck, unable to migrate my code base as some other packages and some additional functionality is calling for .net 6. Thanks!

MCAleckson avatar Dec 05 '22 16:12 MCAleckson

Set your target version to android 12 guys

Set your target version to android 12 guys Yes Now that issue is resolved.. Thanks..

I am having one more issue, In foreground I am not receiving the notification. Below code sample. Insted of that i kept Alert message. I can get Alert message but Notification message not getting any idea.. Please help

CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) => { try { System.Diagnostics.Debug.WriteLine("Received"); if (p.Data.ContainsKey("body")) { Device.BeginInvokeOnMainThread(() => { App.AppUtility.ShowAlert("MYSPS", p.Data["body"].ToString()); });

                }
            }
            catch (Exception ex)
            {

            }

        };

hairkrishnanp88 avatar Dec 07 '22 17:12 hairkrishnanp88

@hairkrishnanp88 On Android this condition must match to show the notification: https://github.com/CrossGeeks/FirebasePushNotificationPlugin/blob/d86266a9f45687b418f5f1e69c348681d1ff6e27/Plugin.FirebasePushNotification/DefaultPushNotificationHandler.android.cs#L151 Make sure that you send the correct parameters in your push message payload. More info: https://github.com/CrossGeeks/FirebasePushNotificationPlugin/issues/434

AlleSchonWeg avatar Dec 08 '22 08:12 AlleSchonWeg

I have this same issue in xamarin.forms, but my target application is android 13.0

caio27093 avatar May 26 '23 20:05 caio27093

google plays min req is now target api 13(api level 33) so the solution must be for these target version othervise google play is not allowe to updated and new user installs. so any suggestion or fix guys?

canerunutkan avatar Sep 22 '23 22:09 canerunutkan