Closed LeoJHarris closed 1 year ago
See sample attached:
@LeoJHarris when you call SetUserNotificationCenterDelegate pass in UserNotificationCenterDelegate
look at on implementing custom CustomUserNotificationCenterDelegate Sample/Direct Maui/LocalNotification.Sample/Platforms/iOS/CustomUserNotificationCenterDelegate.cs
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
// if you want to handle push notifications
LocalNotificationCenter.SetCustomUserNotificationCenterDelegate(new CustomUserNotificationCenterDelegate());
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
https://github.com/thudugala/Plugin.LocalNotification/wiki/%5BiOS%5D-Working-with-push-notifications
Might be more a configuration question but we have remote notification support so we are overriding the
WillPresentNotification
andDidReceiveNotificationResponse
similar to what you see below (code stripped out):And in
AppDelegate
we setup ourUserNotificationCenterDelegate
and set accordingly:The problem the
NotificationReceiving
event is not being called:below prevents
NotificationReceiving
from being calledWe need access to the overridden methods in the
UserNotificationCenterDelegate
to handle remote notifications in the foreground which is working fine but now theNotificationReceiving
has stopped firing