Post

Replies

Boosts

Views

Activity

Reply to Accessing security scoped URLs without calling url.startAccessingSecurityScopedResource
Thanks very much indeed for your detailed explanation, and I am much clearer now about what is going on. In answer to you question, I have a marine navigation app which has a function "openChart(url)" to open a file stored on the device in a user selected folder, and the function brackets the file opening code with a start/stop. When the user selects a folder, the code loops through the contents and does two things. 1. Uses FileManager to obtain the file size and creation date (bracketed by a start/stop) 2. Calls openChart(url) to extract a title and create a thumbnail So that's 2 start/stop calls per loop, which was actually fine until very recently when a customer selected a folder with 764 files in it. The error appeared after exactly 340 iterations on his device as well as on my iPad pro, and could only be cured by re-starting the app. Saving and loading the bookmark, along with removing the start/stop calls solved the problem, but following your explanation I have implemented the suggestion made by Etresoft and moved the start/stop code to bracket the loop. This also fixes the problem. I haven't so far encountered a need to use an external volume so have not yet encountered bug r.102995804. However, it is a possible use case for my app so I will look into that and report back as you suggest.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’25