ma11hew28
ma11hew28

Reputation: 126547

How to delete all files stored by a previous version of iPhone app?

I understand Clearing NSUserDefaults.

But, how do I programmatically clear the file system & old resources?

I want to go with programmatically clearing secondary cache on iPhone, but which directories should I specify? I think NSDocumentDirectory is sufficient (where the old Core Data SQLite file is stored), but are there any others?

Upvotes: 5

Views: 1220

Answers (1)

Leonardo
Leonardo

Reputation: 9857

I was in need of doing some app cleaning as well. I found more files in the library directory, all the fetched results controller cache for example. Look for:

[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)]

But, if you want to have an in depth look, try to connect an iOS device, and look into the Xcode organizer in device section. You will see the full application directory. Or in ~/Library/iPhone Simulator/5.0/yourAppID Or a similiar path in your Mac, you can see the same relevant folder. In this case, try to browse folders using terminal, because some directory are hidden.

If you also have some iCloud files, there are located in ubiquity url.

Upvotes: 2

Related Questions