You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your project MauiFirebaseDemo/MauiFirebaseDemo/ does not work with IOS and I get the following error.
[0:] An error occurred: 'Object reference not set to an instance of an object.'. Callstack: ' at Plugin.Firebase.CloudMessaging.FirebaseCloudMessagingImplementation.RegisterForRemoteNotifications()
at Plugin.Firebase.CloudMessaging.FirebaseCloudMessagingImplementation.Initialize()
at Plugin.Firebase.iOS.CrossFirebase.Initialize(UIApplication app, NSDictionary options, CrossFirebaseSettings settings, Options firebaseOptions, String name)
at MauiFirebaseDemo.MauiProgram.<>c.b__1_3(UIApplication app, NSDictionary launchOptions) in C:\SourceCode\PlayGround\MauiFirebaseDemo\MauiProgram.cs:line 36
at Microsoft.Maui.MauiUIApplicationDelegate.<>c__DisplayClass6_0.b__0(FinishedLaunching del)
at Microsoft.Maui.LifecycleEvents.LifecycleEventServiceExtensions.InvokeLifecycleEvents[FinishedLaunching](IServiceProvider services, Action`1 action)
at Microsoft.Maui.MauiUIApplicationDelegate.FinishedLaunching(UIApplication application, NSDictionary launchOptions)
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
at MauiFirebaseDemo.Program.Main(String[] args) in C:\SourceCode\PlayGround\MauiFirebaseDemo\Platforms\iOS\Program.cs:line 13
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)'
The app has been terminated.
I noticed, in this statement
CrossFirebase.Initialize(app, launchOptions, CreateCrossFirebaseSettings());
launchOptions is null
The text was updated successfully, but these errors were encountered:
Yup, we have the exact same issue. Importing the source code of the library, the field causing this is the Messaging.SharedInstance field which is null. This can be found here. This where the exception is raised.
Seems that also this field is readonly, so unable to initialize it by hand for testing purposes. The value is retrieved like this: return Runtime.GetNSObject<Messaging>(ApiDefinition.Messaging.NativeHandle_objc_msgSend(class_ptr, Selector.GetHandle("messaging"))); from Objective-C code directly.
Are we missing something from the plateform initialization? Following your tutorial and using this repo or our code, same issue.
Your project MauiFirebaseDemo/MauiFirebaseDemo/ does not work with IOS and I get the following error.
[0:] An error occurred: 'Object reference not set to an instance of an object.'. Callstack: ' at Plugin.Firebase.CloudMessaging.FirebaseCloudMessagingImplementation.RegisterForRemoteNotifications()
at Plugin.Firebase.CloudMessaging.FirebaseCloudMessagingImplementation.Initialize()
at Plugin.Firebase.iOS.CrossFirebase.Initialize(UIApplication app, NSDictionary options, CrossFirebaseSettings settings, Options firebaseOptions, String name)
at MauiFirebaseDemo.MauiProgram.<>c.b__1_3(UIApplication app, NSDictionary launchOptions) in C:\SourceCode\PlayGround\MauiFirebaseDemo\MauiProgram.cs:line 36
at Microsoft.Maui.MauiUIApplicationDelegate.<>c__DisplayClass6_0.b__0(FinishedLaunching del)
at Microsoft.Maui.LifecycleEvents.LifecycleEventServiceExtensions.InvokeLifecycleEvents[FinishedLaunching](IServiceProvider services, Action`1 action)
at Microsoft.Maui.MauiUIApplicationDelegate.FinishedLaunching(UIApplication application, NSDictionary launchOptions)
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
at MauiFirebaseDemo.Program.Main(String[] args) in C:\SourceCode\PlayGround\MauiFirebaseDemo\Platforms\iOS\Program.cs:line 13
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)'
The app has been terminated.
I noticed, in this statement
CrossFirebase.Initialize(app, launchOptions, CreateCrossFirebaseSettings());
launchOptions is null
The text was updated successfully, but these errors were encountered: