Post

Replies

Boosts

Views

Activity

Reply to Cannot modify files outside my iOS app's sandbox. Permissions issue.
I finally found a solution. According to this document, the user first needs to pick a folder to give the app access by returning a security-scoped URL (which you can then bookmark for later use) for it and all of its content. After the user picks the folder, they can do whatever they want on another picker for the specified file type. It's still way too complicated for users to understand why they have to do this, so I made a user-friendly flow so that users are informed on how to continue. It still lacks some toast notifications for success but you'll get the idea. The code is on the repo I posted before. If there's a way to make this in one step instead of having to prompt the user for a folder selection, it would be great. Please do let me know. Until then, this is what I could come up with.
Jan ’24
Reply to Cannot modify files outside my iOS app's sandbox. Permissions issue.
Thank you for your support. I'm sure I must be misunderstanding everything :( I tried your suggestion but it doesn't rename files on my phone's storage, still getting the permissions error. if security-scoped bookmarks are not available on iOS then I guess what I'm trying to do is not possible, making my app project not useful at all :'( Is there a special entitlement I could get to be able to do this? The idea is that the app is a tool that can batch rename lots of files in external storage connected to the phone (and within the phone as well). Here is a repo with a minimum reproducible example: https://github.com/juanmartin/renamerApp-ios Thanks again.
Jan ’24