Privacy: Auto-delete logs (no functionality yet)

This commit is contained in:
relikd
2020-06-28 14:20:31 +02:00
parent 43de81929f
commit 80afa6aff1
8 changed files with 231 additions and 120 deletions

View File

@@ -0,0 +1,15 @@
import Foundation
enum PrefsShared {
private static var suite: UserDefaults { UserDefaults(suiteName: "group.de.uni-bamberg.psi.AppCheck")! }
private static func Int(_ key: String) -> Int { suite.integer(forKey: key) }
private static func Int(_ val: Int, _ key: String) { suite.set(val, forKey: key) }
// private static func Obj(_ key: String) -> Any? { suite.object(forKey: key) }
// private static func Obj(_ val: Any?, _ key: String) { suite.set(val, forKey: key) }
static var AutoDeleteLogsDays: Int {
get { Int("AutoDeleteLogsDays") }
set { Int(newValue, "AutoDeleteLogsDays"); suite.synchronize() }
}
}