[quote='849503022, Baylward, /thread/793561?answerId=849503022#849503022, /profile/Baylward'] the 'Summarise folder without permission' button does NOT work, so there doesn't seem to be any implicit "start" [/quote]
I'm sorry, but I don't know what you mean by "does NOT work". Is it throwing an exception? Or failing in some other way? What is the specific context of this "failure"?
You aren't checking the result of startAccessingSecurityScopedResource(). So then you are calling stopAccessingSecurityScopedResource() based only on the permission value, which is wrong. You should only call stopAccessingSecurityScopedResource() if startAccessingSecurityScopedResource() returns true.
[quote='849503022, Baylward, /thread/793561?answerId=849503022#849503022, /profile/Baylward'] Strangely running the identical code on a simulator DOES work, which I also find confusing. [/quote]
That part's easy enough. Whenever there is a discrepancy between the behaviour of the simulator vs. a real device, the simulator is always wrong.
[quote='849503022, Baylward, /thread/793561?answerId=849503022#849503022, /profile/Baylward'] errors occurring when accessing hundreds of URLs, each bracketed by the accessing calls [/quote]
I don't know how you're ever going to get hundreds of URLs on iOS. Normally, the user selects a single URL. If you are loading and saving bookmarks, you're probably only doing that for a few URLs at a time. It makes sense to put the accessing calls at a higher level of code. That way, when your lower-level code accesses the contents, perhaps with hundreds of URLs, you don't have to worry about any of this. Those are then just regular 'ole URLs.
[quote='849503022, Baylward, /thread/793561?answerId=849503022#849503022, /profile/Baylward'] my main concern is that the code doesn't seem to be behaving as expected from the documentation, and I don't understand why! [/quote]
As I said, the documentation is very explicit about when these accessing calls are required. You only need them when loading from a security-scoped bookmark. In your case, because you need them when loading from a security-scoped bookmark, they work, even though you aren't using them correctly. In this case, it just so happens that startAccessingSecurityScopedResource() returns true and then your call to stopAccessingSecurityScopedResource() also works. But then when you use them incorrectly in the case where you don't need them, they fail, because you haven't checked the result of startAccessingSecurityScopedResource() and you call stopAccessingSecurityScopedResource() when you shouldn't.
My recommendation is to simply use the API correctly and then everything works. That way, your lower-level code never needs to know about any of this. Your code is also portable across other Apple platforms like macOS where these bookmarks behave differently. And your code is more robust because it will then work regardless of where the URL came from. You can use the same business logic for a URL read from a file or defaults, or selected by the user.