diff --git a/Neuro App/AppDelegate.swift b/Neuro App/AppDelegate.swift index d544175..9d58269 100644 --- a/Neuro App/AppDelegate.swift +++ b/Neuro App/AppDelegate.swift @@ -90,17 +90,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD checkforUUID() // Configure notification settings UNUserNotificationCenter.current().delegate = self - UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in - if granted { - DispatchQueue.main.async { - UIApplication.shared.registerForRemoteNotifications() - } - } else { - print("Notification permission denied: \(String(describing: error))") - } - } - AVCaptureDevice.requestAccess(for: .video) { granted in + AVCaptureDevice.requestAccess(for: .video) { granted in if granted { // Access granted } else { @@ -115,6 +106,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD // Access denied } } + + UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in + if granted { + DispatchQueue.main.async { + UIApplication.shared.registerForRemoteNotifications() + } + } else { + print("Notification permission denied: \(String(describing: error))") + } + } + + + + + registerForVoIPPushes()