Skip to content

Commit 57467c9

Browse files
committed
fix(ios): not remove bookmark while resolve fails
The failure may be temporary, and not removing the bookmark may alleviate the need for user interaction and frustration, but it does not solve the underlying problem, and the error will still occur silently.
1 parent 77a0ec8 commit 57467c9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

xcode/Shared/Preferences.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ private struct SecurityScopedBookmark {
237237
}
238238
var isStale = false
239239
guard let url = resolvBookmark(data, &isStale) else { // get security-scoped URL
240-
SDefaults?.removeObject(forKey: key) // remove data that cannot be resolved
240+
// Note: temporary mitigation measures for occasional failures on some iOS devices
241+
// SDefaults?.removeObject(forKey: key) // remove data that cannot be resolved
242+
logger?.warning("\(#function, privacy: .public) - faild resolv bookmark, return default")
241243
return defaultValue
242244
}
243245
if isStale, url.startAccessingSecurityScopedResource() { // renew URL bookmark

0 commit comments

Comments
 (0)