Moved notification permission request to initial VC

This commit is contained in:
Aaron
2021-01-24 18:37:57 -05:00
parent 7a94b3fbf8
commit e0fb3ced68
+9
View File
@@ -9,6 +9,15 @@ class AlarmViewController: UIViewController
{
super.viewDidLoad()
//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)
}
}
// Assign table delegate and data source
AlarmViewController.staticTable = table
table.delegate = self