mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-11 15:53:30 +01:00
mdc v14
This commit is contained in:
@@ -16,16 +16,26 @@ func patch3AppLimit(completion: @escaping (PatchResult) -> ()) {
|
||||
if let error = error {
|
||||
completion(.failure(PatchError.NoFDA(msg: "Failed to get full disk access: \(error)")))
|
||||
}
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
print("This is run on a background queue")
|
||||
if !patch_installd() {
|
||||
completion(.failure(PatchError.FailedPatchd))
|
||||
}
|
||||
// DispatchQueue.global(qos: .userInitiated).async {
|
||||
print("This is run on a background queue")
|
||||
if !patch_installd() {
|
||||
completion(.failure(PatchError.FailedPatchd))
|
||||
}
|
||||
// }
|
||||
completion(.success)
|
||||
}
|
||||
}
|
||||
|
||||
func bootTime() -> Date? {
|
||||
var tv = timeval()
|
||||
var tvSize = MemoryLayout<timeval>.size
|
||||
let err = sysctlbyname("kern.boottime", &tv, &tvSize, nil, 0);
|
||||
guard err == 0, tvSize == MemoryLayout<timeval>.size else {
|
||||
return nil
|
||||
}
|
||||
return Date(timeIntervalSince1970: Double(tv.tv_sec) + Double(tv.tv_usec) / 1_000_000.0)
|
||||
}
|
||||
|
||||
enum WhitelistPatchResult {
|
||||
case success, failure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user