If you are saving data in your apps then you are saving them to your app’s sandboxed documents directory. In simulator files you can easily inspect the contents of the directory if you just browse there with finder or cd there in terminal. Note that there is a space in the path, so you need to put exclamation marks around it if you use it with cd in terminal.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSLog(documentsDirectory); // output documents directory to debug console |
Copy this path, open terminal and go:
MacDrops:~ Oliver$ cd "/Users/Oliver/Library/Application Support/iPhone Simulator/User/Applications/AAC8D0E8-C134-4A94-ACA9-88C7A58DCE1C/Documents" |
Or if you prefer Finder then use the handy option “Go To Folder …” and paste the path there. Bear in mind that with every new build the documents directory gets moved to a new application ID. The contents will persist, but the path changes. If you navigate to the ../User/Applications folder you will find that the newest directory is the one that belongs to your just-built app.
There are some rare cases though when you find that Simulator behaves differently than a device. How can you inspect the files there?
Read more
Read more