Closed sreejith-pagematics closed 10 months ago
Fixed this issue by replacing FinishedLaunching
with WillFinishLaunching
on MauiProgram.cs.
private static MauiAppBuilder RegisterFirebaseServices(this MauiAppBuilder builder)
{
builder.ConfigureLifecycleEvents(events => {
#if IOS
events.AddiOS(iOS => iOS.WillFinishLaunching((app, launchOptions) => {
CrossFirebase.Initialize(CreateCrossFirebaseSettings());
CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true);
return false;
}));
#else
events.AddAndroid(android => android.OnCreate((activity, _) =>
CrossFirebase.Initialize(activity, CreateCrossFirebaseSettings())));
CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true);
#endif
});
builder.Services.AddSingleton(_ => CrossFirebaseAuth.Current);
return builder;
}
I am getting below exception on the iOS platform for creating FCM Token.
My FCM Token Code:
I did below set up on iOS platform:
Added the below codes on AppDelegate.cs file.
using Plugin.Firebase.DynamicLinks;
public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler) { FirebaseDynamicLinksImplementation.ContinueUserActivity(application, userActivity, completionHandler); return base.ContinueUserActivity(application, userActivity, completionHandler); }
public override bool OpenUrl(UIApplication application, NSUrl url, NSDictionary options) { FirebaseDynamicLinksImplementation.OpenUrl(application, url, options); return base.OpenUrl(application, url, options); }
Is any other set up is pending on iOS platform? Is it a known issue?