Cleanup of agent

This commit is contained in:
Max Goedjen
2020-03-16 23:34:38 -07:00
parent 2095dd1203
commit 6d2f767c97
4 changed files with 46 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
import Foundation
import SecretKit
import SecretAgentKit
import UserNotifications
class Notifier {
@@ -10,7 +11,7 @@ class Notifier {
}
}
func notify<SecretType: Secret>(accessTo secret: SecretType) {
func notify(accessTo secret: AnySecret) {
let notificationCenter = UNUserNotificationCenter.current()
let notificationContent = UNMutableNotificationContent()
notificationContent.title = "Signed Request"
@@ -20,3 +21,11 @@ class Notifier {
}
}
extension Notifier: SigningWitness {
func witness(accessTo secret: AnySecret) throws {
notify(accessTo: secret)
}
}