Carthage copy-frameworks + Filter changed extension reload

This commit is contained in:
relikd
2020-03-19 15:57:16 +01:00
parent 126da073a5
commit 2473e77519
15 changed files with 141 additions and 113 deletions

View File

@@ -0,0 +1,23 @@
import Foundation
fileprivate extension FileManager {
func exportDir() -> URL {
try! url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
}
func appGroupDir() -> URL {
containerURL(forSecurityApplicationGroupIdentifier: "group.de.uni-bamberg.psi.AppCheck")!
}
func internalDB() -> URL {
appGroupDir().appendingPathComponent("dns-logs.sqlite")
}
func appGroupIPC() -> URL {
appGroupDir().appendingPathComponent("data-exchange.dat")
}
}
extension URL {
static func exportDir() -> URL { FileManager.default.exportDir() }
static func appGroupDir() -> URL { FileManager.default.appGroupDir() }
static func internalDB() -> URL { FileManager.default.internalDB() }
static func appGroupIPC() -> URL { FileManager.default.appGroupIPC() }
}

View File

@@ -9,7 +9,7 @@ extension NSNotification.Name {
func post(_ obj: Any? = nil) {
NotificationCenter.default.post(name: self, object: obj)
}
func postOnMainThread(_ obj: Any? = nil) {
func postAsyncMain(_ obj: Any? = nil) {
DispatchQueue.main.async { NotificationCenter.default.post(name: self, object: obj) }
}
/// You are responsible for removing the returned object in a `deinit` block.