[O] Put notification permission request in the correct location

This commit is contained in:
Hykilpikonna
2021-01-28 02:05:08 -05:00
parent 15949b6405
commit 6f77eb0881
3 changed files with 12 additions and 18 deletions
+12
View File
@@ -25,9 +25,21 @@ class AlarmActivator: UITabBarController
/// Timer for getting family alarm updates
var familyTimer: Timer?
/**
Called when the app started
*/
override func viewDidLoad()
{
start()
// Get notification permissions from user
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, error in
if success {
print("All set!")
} else if let error = error {
print(error.localizedDescription)
}
}
}
/**