Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions Neuro App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()

Expand Down
Loading