Skip to content

Commit 975851e

Browse files
authored
Merge pull request #825 from piotrtorczynski/notification_status
Take into consideration not determined status into checking notifications access status
2 parents e5de2b7 + 855d049 commit 975851e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swift-sdk/Internal/InternalIterableAppIntegration.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ protocol NotificationStateProviderProtocol {
1616
struct SystemNotificationStateProvider: NotificationStateProviderProtocol {
1717
func isNotificationsEnabled(withCallback callback: @escaping (Bool) -> Void) {
1818
UNUserNotificationCenter.current().getNotificationSettings { setttings in
19-
callback(setttings.authorizationStatus != .denied)
19+
let notificationsDisabled = setttings.authorizationStatus == .notDetermined || setttings.authorizationStatus == .denied
20+
callback(!notificationsDisabled)
2021
}
2122
}
2223

0 commit comments

Comments
 (0)