Iphone: How to read a file created by another application ?

Hi everyone, I have a problem: i’m trying to save a .txt file with an app and read it with another one.

But it doesn’t work. I tried to use Application.persistentdatapath but when i try to access to the persistentdatapath of another application the access is just locked.

I heard on iphone there are some paths/directories where i can write and read files but i don’t know wich one i can use :confused: Maybe there are some tips to share a file between 2 apps on Iphone ?

On android it works perfectly but on iphone i just don’t understand…

If someone can help me please ?

This is not possible on the iOS platform by design. Each app runs in a sandbox and so only has access to the data that it creates. You’d need some external storage solution, like integrating dropbox or google drive to make this work. Another option may be to use a custom url scheme to pass data between the apps, but application A cannot access the contents of application B’s data; sorry.

An app is generally prohibited from accessing or creating files outside its container directories. One exception to this rule is when an app uses public system interfaces to access things such as the user’s contacts or music. In those cases, the system frameworks use helper apps to handle any file-related operations needed to read from or modify the appropriate data stores.