Created
August 21, 2019 05:57
-
-
Save susanna2222/b9dfb9b34e7bde3e884b10cd0cde53d0 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 isAllowReceiveNotification() -> Bool{ | |
var isAllow = true | |
notificationCenter.getNotificationSettings { (settings) in | |
// Do not schedule notifications if not authorized. | |
if (settings.authorizationStatus != .authorized || settings.alertSetting != .enabled){ | |
isAllow = false | |
} | |
} | |
return isAllow | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment