Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

'currentUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 #93

Open
SarahGhorbani opened this issue Jan 6, 2024 · 1 comment

Comments

@SarahGhorbani
Copy link

Hello,
I get these 6 errors in your package in the ios section:

1- 'currentUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]

2- 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings

3- 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings

4- 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions

5- 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions

6- 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions

I used IOS 17.
Do you have any solution or update?

@kirkmorrow
Copy link

Looking at the code there is already a conditional to handle this as shown below. I also see these but only as warnings in Xcode but not errors.

    if (@available(iOS 10, *)) {
        UNUserNotificationCenter *center = [UNUserNotificationCenter
...
    } else {
        UIUserNotificationSettings* notificationSettings =

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants