diff --git a/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift b/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift index 3fb2e22fa..1de6188a1 100644 --- a/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift +++ b/swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift @@ -107,9 +107,17 @@ private class NotificationAdapter: NSObject, UNUserNotificationCenterDelegate { notificationCenter.delegate = self notificationCenter.requestAuthorization(options: [.sound, .badge, .alert]) { _, error in - if let error = error { - Log.error(error) + guard let error = error else { return } + + // If the user hasn't enabled notifications for Firezone, we may receive + // a notificationsNotAllowed error here. Don't log it. + if let unError = error as? UNError, + unError.code == .notificationsNotAllowed { + return } + + // Log all other errors + Log.error(error) } }