Yes, the same happens in the home folder as well.
After reading each file path from the database, I am trying to access each file like this:
if let percentDecoded = "\(dbPath)\(relativeFilePathFromDb)".removingPercentEncoding,
let url = URL(string: percentDecoded),
let normalizedUrl = URL(string: url.path, relativeTo: URL(fileURLWithPath: "/"))?.standardizedFileURL {
print("\(normalizedUrl)") // this outputs the expected path
let success = normalizedUrl.startAccessingSecurityScopedResource()
if success { // this is always false
// ...
} else {
print("Unable to access file!")
}
normalizedUrl.stopAccessingSecurityScopedResource()
}
Is this maybe the wrong way to construct the path url?
Post
Replies
Boosts
Views
Activity
After wasting hours with this weird behavior, I've accepted that this is a perfect speciment of the "you're holding it wrong"-situation.
Let me put it this way (thinking about this a few times solved my problem):
Whatever you want to render above/below the List (which is why you need the scrollview) can also be put into a separate Segment of the list. It won't look as bad as you might initially think!