I am using Xamarin.iOS and I know that ReceivedLocalNotification is deprecated on iOS 10+
So I implemented:
UNUserNotificationCenter.Current.Delegate = new UserNotificationCenterDelegate();
Which leads to following:
public class UserNotificationCenterDelegate : UNUserNotificationCenterDelegate {
public UserNotificationCenterDelegate() { }
public override void WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action<UNNotificationPresentationOptions> completionHandler)
{
completionHandler(UNNotificationPresentationOptions.Alert);
}
public override void DidReceiveNotificationResponse(UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler)
{
....
}
}
I am using iOS 10/ iOS 11 and the Local Notification fires in background but I am not able to get the event.
Is this even possible to get the event when Local Notification is fired without the user interacting with it?