Hi, so I have this case where I would like the user to pick a folder where they want to create a file/folder using UIDocumentPicker/Browser and I make the file using open() in cpp and use its fd to read/write to the file. Now, the first thing is I have to call startAccessingSecurityScopedResource() on the directory url, then I make the file, get its fd(file descriptor) and I leave this makefile() function.
Every startAccessingSecurityScopedResource() needs to be matched with a stopstartAccessingSecurityScopedResource().
So my question is do I 'have' to call stopAccessingSecurityScopedResource() 'just before' calling close() on the fd.
Or is it fine to call it after I have made the fd i.e., at the end of the makefile() function?
In the tests I did it seems that once the fd is opened, even if stopAccessingSecurityScopedResource() is called on it(the directory), I can continue to read/write from the fd until I close() the fd?