iOS Local Notifications

XamarinSnobXamarinSnob USUniversity ✭✭

I've been trying to get a local notification to pop up in the notification manager using the sample code provided by the Xamarin titled "Notifications in Xamarin.iOS" with no success.

What is it I might be missing? I'm debugging (Visual Studio) the app on an iPad Mini.

Any ideas are welcome ;)

Posts

  • XamarinSnobXamarinSnob USUniversity ✭✭

    iOS 8.1 requires that you ask for permission, imagine that ...

    UIUserNotificationType notificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
    var userNoticationSettings = UIUserNotificationSettings.GetSettingsForTypes(notificationTypes, new NSSet(new string[] { }));
    UIApplication.SharedApplication.RegisterUserNotificationSettings(userNoticationSettings);
    
Sign In or Register to comment.