-
-
Save lmiller1990/74c6078d91828cc8e907b138d31c2b70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func schedule() -> Void { | |
UNUserNotificationCenter.current().getNotificationSettings { settings in | |
switch settings.authorizationStatus { | |
case .notDetermined: | |
self.requestPermission() | |
case .authorized, .provisional: | |
self.scheduleNotifications() | |
default: | |
break | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment