I have an Xamarin IOS project and I would like to create local notifications. For that I have to ask the user for permission. I have this code in the AppDelegate:
UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert, (approved, err) =>
{
// Handle approval
});
That works so far, but unfortunately the dialog from requesting the permissions is behind the splash screen. Therefore it looks for the user as if the app was stuck. If he clicks the home button then he can see the permission dialog.
I also tried to put it in the first view in the ViewDidLoad or the ViewDidLayoutSubviews Method. But the effect was the same.
How can I display the dialog properly?