Skip to content

Commit

Permalink
UIApplication.shared.canOpenURL() background thread change
Browse files Browse the repository at this point in the history
  • Loading branch information
r3ggi committed Jul 18, 2023
1 parent 9e113aa commit 5f7cb8b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions IOSSecuritySuite/JailbreakChecker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,14 @@ internal class JailbreakChecker {
// "cydia://" URL scheme has been removed. Turns out there is app in the official App Store
// that has the cydia:// URL scheme registered, so it may cause false positive
private static func checkURLSchemes() -> CheckResult {
var flag: (passed: Bool, failMessage: String) = (true, "")
let urlSchemes = [
"undecimus://",
"sileo://",
"zbra://",
"filza://",
"activator://"
]

if Thread.isMainThread {
flag = canOpenUrlFromList(urlSchemes: urlSchemes)
} else {
let semaphore = DispatchSemaphore(value: 0)
DispatchQueue.main.async {
flag = canOpenUrlFromList(urlSchemes: urlSchemes)
semaphore.signal()
}
semaphore.wait()
}
return flag
return canOpenUrlFromList(urlSchemes: urlSchemes)
}

private static func checkExistenceOfSuspiciousFiles() -> CheckResult {
Expand Down

0 comments on commit 5f7cb8b

Please sign in to comment.