Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4 - Easily access "Documents" folder of an app installed onto the simulator

When running an app onto the simulator, it creates a folder onto the Mac to contain the apps datas in a "Documents" folder. This folder is changed when you delete the app from the simulator, or when you change some app settings into XCode. When you have dozens of apps, it's a nightmare to find the good one by hand.

Is there a way to easily access this folder ?

like image 533
Oliver Avatar asked Dec 26 '22 21:12

Oliver


2 Answers

Just gonna try answering. How about logging it, like this:

    //App Directory & Directory Contents
   NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
   NSFileManager *fileManager = [NSFileManager defaultManager];  
   NSLog(@"App Directory is: %@", appFolderPath);
   NSLog(@"Directory Contents:\n%@", [fileManager directoryContentsAtPath: appFolderPath]);
like image 112
Bazinga Avatar answered Jan 04 '23 09:01

Bazinga


What I do is create a link in the Finder sidebar to the simulator folder. It is approximately:

/Users/userName/Library/Application/Support/iPhone/Simulator/5.0/Applications/

Then I have that folder sorted by 'last modified'. Once I find the app folder for the app I am working on, I expand it to display the app (and see the app name) and also set a color on the folder. The Finder sometimes doesn't keep the folder sorted by 'last modified' unless the window is closed and reopened.

like image 27
spring Avatar answered Jan 04 '23 09:01

spring