1
0
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:
2021-12-06 17:19:08 +01:00
parent e381880675
commit 92a6d506dc
10 changed files with 99 additions and 41 deletions

View File

@ -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