Forum Xamarin.iOS

Alert Style

Is there any way to set the default alert style for an app? I know the user can set it to Alert, Banner, or None in the settings but I would like to be able to set the default to Alert for the app when it first registers for notifications.


  • prashantvcprashantvc USXamarin Team Xamurai
    edited September 2016

    Yes, you can default to Alert notification style, when you configure the notifications.

    Here's how you do it (from

    if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0)) {
        var pushSettings = UIUserNotificationSettings.GetSettingsForTypes (
                           new NSSet ());
        UIApplication.SharedApplication.RegisterUserNotificationSettings (pushSettings);
        UIApplication.SharedApplication.RegisterForRemoteNotifications ();
    } else {
        UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert;
        UIApplication.SharedApplication.RegisterForRemoteNotificationTypes (notificationTypes);
Sign In or Register to comment.