Skip to content

Commit

Permalink
notify fix
Browse files Browse the repository at this point in the history
  • Loading branch information
m1rosh committed May 21, 2024
1 parent 1867b8b commit b6c463c
Showing 1 changed file with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,21 @@ struct TimerView: View {
print("add")

}
addRequest()

center.getNotificationSettings { settings in
if settings.authorizationStatus == .authorized {
addRequest()
} else {
center.requestAuthorization(options: [.alert, .badge, .sound]) { success, _ in
if success {
addRequest()
} else {
print("Authorization declined")
}
}
}
}
return identifier



// center.getNotificationSettings { settings in
// if settings.authorizationStatus == .authorized {
// addRequest()
// } else {
// center.requestAuthorization(options: [.alert, .badge, .sound]) { success, _ in
// if success {
// addRequest()
// } else {
// print("Authorization declined")
// }
// }
// }
// }
}

func removeNotification(identifier: String) {
Expand Down

0 comments on commit b6c463c

Please sign in to comment.