mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-08 05:37:59 +02:00
fix(ios): use security-scoped bookmarks for download directory persistence
- Switch iOS bookmark creation from .minimalBookmark to .withSecurityScope - Add .withSecurityScope option when resolving bookmarks - Add downloadDirectoryBookmark field to AppSettings for persisting iOS bookmarks - Resolve bookmark and startAccessingIosBookmark before queue processing - Guarantee stopAccessingIosBookmark cleanup via try/finally - Create bookmark on folder pick in both setup screen and download settings - Clear bookmark when switching to SAF mode or iOS path normalization - Fix stale bottom sheet context usage (ctx -> context) in download settings
This commit is contained in:
@@ -1021,7 +1021,7 @@ import Gobackend // Import Go framework
|
||||
let url = URL(fileURLWithPath: path)
|
||||
do {
|
||||
let bookmarkData = try url.bookmarkData(
|
||||
options: .minimalBookmark,
|
||||
options: .withSecurityScope,
|
||||
includingResourceValuesForKeys: nil,
|
||||
relativeTo: nil
|
||||
)
|
||||
@@ -1051,7 +1051,7 @@ import Gobackend // Import Go framework
|
||||
do {
|
||||
url = try URL(
|
||||
resolvingBookmarkData: bookmarkData,
|
||||
options: [],
|
||||
options: .withSecurityScope,
|
||||
relativeTo: nil,
|
||||
bookmarkDataIsStale: &isStale
|
||||
)
|
||||
@@ -1086,7 +1086,7 @@ import Gobackend // Import Go framework
|
||||
do {
|
||||
url = try URL(
|
||||
resolvingBookmarkData: bookmarkData,
|
||||
options: [],
|
||||
options: .withSecurityScope,
|
||||
relativeTo: nil,
|
||||
bookmarkDataIsStale: &isStale
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user