mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
♻️ Cleanup, updated target for tests
This commit is contained in:
@ -10,20 +10,6 @@ import UserNotifications
|
||||
|
||||
class LocalNotification {
|
||||
|
||||
public static func askForPermission() {
|
||||
UNUserNotificationCenter.current().requestAuthorization(options: [.alert], completionHandler: { granted, error in
|
||||
if granted {
|
||||
print("PHP Monitor has permission to show notifications.")
|
||||
} else {
|
||||
print("PHP Monitor does not have permission to show notifications.")
|
||||
}
|
||||
if let error = error {
|
||||
print("PHP Monitor encounted an error determining notification permissions:")
|
||||
print(error)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
public static func send(title: String, subtitle: String) {
|
||||
let content = UNMutableNotificationContent()
|
||||
content.title = title
|
||||
|
Reference in New Issue
Block a user