Check whether user notifications are enabled after UILocalNotification deprecation
In my app, I want to be able to check if the user has notifications enabled or not. In iOS 10, I did this using a check in the delegate. This check is now deprecated and I want to update it, but I can't figure out what to use in iOS 11. The deprecation warning is as follows: currentUserNotificationSettings' was deprecated in iOS 10.0: Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:] I've tried to update the code with the help of this warning but I can't