Logs sideloading-related events with OSLog

This commit is contained in:
Riley Testut
2023-10-18 14:06:10 -05:00
committed by Magesh K
parent 6adf55b4b6
commit 93b6da4855
13 changed files with 161 additions and 22 deletions

View File

@@ -233,9 +233,9 @@ private extension VerifyAppOperation
let data = try Data(contentsOf: ipaURL)
let sha256Hash = SHA256.hash(data: data)
let hashString = sha256Hash.compactMap { String(format: "%02x", $0) }.joined()
print("[ALTLog] Comparing app hash (\(hashString)) against expected hash (\(expectedHash))...")
Logger.sideload.debug("Comparing app hash (\(hashString, privacy: .public)) against expected hash (\(expectedHash, privacy: .public))...")
guard hashString == expectedHash else { throw VerificationError.mismatchedHash(hashString, expectedHash: expectedHash, app: app) }
}