Bug 58516 - types property is missing in UIUserNotificationSettings
Summary: types property is missing in UIUserNotificationSettings
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 10.8 (d15-1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-08-01 08:33 UTC by Sune Kjærgård
Modified: 2017-08-01 10:30 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sune Kjærgård 2017-08-01 08:33:09 UTC
When you get the current user notification settings to determine what types of notifications are allowed, the types property (https://developer.apple.com/documentation/uikit/uiusernotificationsettings/1615321-types) is not available.

Even though UIUserNotificationSettings is deprecated in iOS 10, you still need to use this if you want to support iOS 8+9.

You should be able to determine what types of notifications the user has allowed:

public class NotificationUtils
	public static bool AreNotificationsEnabled ()
		var settings = UIApplication.SharedApplication.CurrentUserNotificationSettings;
		var allowed types = settings.types <-- Make this work
Comment 1 Prashant [MSFT] 2017-08-01 09:13:42 UTC

Thanks so much for taking the time to submit this report! I’m unable to reproduce this issue using the latest version Xamarin.iOS (see https://prshntvc.tinytake.com/sf/MTgzMjcyNF81OTMyMDM2)

Please attach the following to help us reproduce this issue: 

-Detailed reproduction steps 

-Version information (Visual Studio → About Visual Studio menu or Help > About > Show Details > Copy Information [button]) 

-Optional: project to reproduce your issue
Comment 2 Sune Kjærgård 2017-08-01 10:30:47 UTC
You are right, sorry for taking your time