Skip to main content
Inspiring
August 11, 2011
Answered

iOS File.documentsDirectory: Deleted when App in Uninstalled?

  • August 11, 2011
  • 1 reply
  • 1688 views

I don't think I can verify this without jailbreaking, which I'm not allowed to do.

On my test iPad, an app's File.documentsDirectory appears to be a folder created specifically for that app. It looks something like this:

/var/mobile/Applications/EB67921A-AB8F-E432J1C3E553/Documents/

This differs from Windows, where File.documentsDirectory is:

C:\Users\<UserName>\Documents\

When you uninstall an app, does the app's Documents directory get deleted? If so, are there any situations where it would not get deleted?

This topic has been closed for replies.
Correct answer Rangora

On iOS, there is no shared directory that all applications can access. It's why the document directory just create his own directory in his local space. Since everything is local on iOS, your directory will be destroyed with the app.

On Android, the documentDirectory is the sd card and won't be deleted with your app.

1 reply

RangoraCorrect answer
Inspiring
August 11, 2011

On iOS, there is no shared directory that all applications can access. It's why the document directory just create his own directory in his local space. Since everything is local on iOS, your directory will be destroyed with the app.

On Android, the documentDirectory is the sd card and won't be deleted with your app.

random_1_Author
Inspiring
August 11, 2011

If I could give you more than 10 points, I would.