Posts

Post not yet marked as solved
0 Replies
256 Views
Hi, so following other tutorials on sharing app files to user I added and enabled LSSupportsOpeningDocumentsInPlace and UIFileSharingEnabled in info.plist. On app launch I create a sample file in the Documents Directory so that it shows up on the "On my iPhone" storage. I check this with the simulators for iOS17, iOS16 and it works fine, but for iOS15 it does not display the folder for my app. Does anyone have an idea on how to fix this?
Posted
by Ash228.
Last updated
.
Post marked as solved
1 Replies
232 Views
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?
Posted
by Ash228.
Last updated
.
Post marked as solved
1 Replies
276 Views
So, I'm looking into startaccessingsecurityscopedresource() function and from my current understanding this is to get temporary access to files/folders you don't implicitly have access to i.e., that don't belong to your sandbox. I can understand what it means wrt macOS, iOS, iPadOS, but what does it mean in watchOS and tvOS where there isn't any file sharing between different apps? And what is it's relevance wrt using iCloud (if there is any?)
Posted
by Ash228.
Last updated
.
Post not yet marked as solved
1 Replies
290 Views
Hi, so I want to have a set of config files and data files which need to be accessible for say 3 of the apps I am building. And these files should be accessible to all 3 regardless of who makes them. The config file can have details like theme etc or sign in details etc. How do I go about doing this? Some of the things I thought of were, Using the app group storage folder, where if I understand correctly, if my apps belong to the same app group and have the required entitlement I can create files, they can be accessed by all 3 apps and they will exist until the last of the applications is uninstalled. Is this right? Letting the user pick a location/folder in "On my iPhone" in each of the apps and store the folder in bookmarks for each of the app. In this way the data will remain even after it is uninstalled. Is there any other way this can be done. Is there a recommended way of doing this?
Posted
by Ash228.
Last updated
.