Skip to content

Commit

Permalink
Merge pull request #825 from piotrtorczynski/notification_status
Browse files Browse the repository at this point in the history
Take into consideration not determined status into checking notifications access status
  • Loading branch information
evantk91 authored Dec 17, 2024
2 parents e5de2b7 + 855d049 commit 975851e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion swift-sdk/Internal/InternalIterableAppIntegration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ protocol NotificationStateProviderProtocol {
struct SystemNotificationStateProvider: NotificationStateProviderProtocol {
func isNotificationsEnabled(withCallback callback: @escaping (Bool) -> Void) {
UNUserNotificationCenter.current().getNotificationSettings { setttings in
callback(setttings.authorizationStatus != .denied)
let notificationsDisabled = setttings.authorizationStatus == .notDetermined || setttings.authorizationStatus == .denied
callback(!notificationsDisabled)
}
}

Expand Down

0 comments on commit 975851e

Please sign in to comment.