fix: 1.0 发版前安全审查与优化修复 #3

Merged
let5see merged 9 commits from release/1.0-final-fixes into main 2026-02-07 20:20:11 +08:00
Showing only changes of commit e08cfc981e - Show all commits

View File

@@ -395,14 +395,18 @@ public actor LivePhotoValidator {
//
if let error = info[PHLivePhotoInfoErrorKey] as? Error {
#if DEBUG
print("[LivePhotoValidator] requestLivePhoto error: \(error.localizedDescription)")
#endif
hasResumed = true
continuation.resume(returning: nil)
return
}
if let cancelled = info[PHLivePhotoInfoCancelledKey] as? Bool, cancelled {
#if DEBUG
print("[LivePhotoValidator] requestLivePhoto cancelled")
#endif
hasResumed = true
continuation.resume(returning: nil)
return
@@ -415,7 +419,9 @@ public actor LivePhotoValidator {
//
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
guard !hasResumed else { return }
#if DEBUG
print("[LivePhotoValidator] requestLivePhoto timeout, requestID: \(requestID)")
#endif
PHLivePhoto.cancelRequest(withRequestID: requestID)
hasResumed = true
continuation.resume(returning: nil)