Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 811
ma11hew28 Avatar asked Nov 04 '22 03:11

ma11hew28


1 Answers

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.

like image 138
Leonardo Avatar answered Nov 15 '22 06:11

Leonardo