Carthage copy-frameworks + Filter changed extension reload
This commit is contained in:
23
main/Extensions/FileManager.swift
Normal file
23
main/Extensions/FileManager.swift
Normal 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() }
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user