Xamarin.Forms on IOS - DidReceiveRemoteNotification doesn't execute code

dai15002dai15002 Member ✭✭

In my Xamarin application where I have implemented push-notifications, I have some executeable code in the DidReceiveRemoteNotification function. The function is not being called when I receive a notification while the application is running on the background, but when I press the received notification in the notification bar then the DidReceiveRemoteNotification function runs. How can I run DidReceiveRemoteNotification right when I receive a notification instead of pressing on the notification to make that function run?

public override void DidReceiveRemoteNotification(UIApplication application,
NSDictionary userInfo, Action completionHandler)
{
//executeable code

    }

Answers

Sign In or Register to comment.