3

For iOS 7.0.3 SDK, I had an document viewing application and I used to place documents under ~/Library/Application\ Support/iPhone\ Simulator/7.0.3/Applications/<GUID>/Documents/ , which were then accessible when I run the app. However, I do not see any such folder iOS 8.1 SDK, and I suspect it might be because I downloaded Xcode via web from developer's site. Am i right in suspecting the above might be the reason i do not 8.1/ folder in Application Support for iPhone Simulator? If yes, is there a way I could add those folders by determining Simulator GUID so my app can start accessing the documents again? Or has the Document folder location been moved to somewhere else?

I followed instructions at Xcode: directory file for simulator Iphone and at iPhone simulator folder not in Application Support but it does not seem to fix my problem.

Community
  • 1
  • 1
learn_develop
  • 1,735
  • 4
  • 15
  • 33

3 Answers3

3

To find your app's document folder, you can simply put this into your application:didFinishLaunchingWithOptions: and you will see the path in your xcode's console window:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSLog(@"Documents Directory: %@", [paths objectAtIndex:0]);
Eike
  • 620
  • 4
  • 6
2

Use SimPholder application to know current application location.

enter image description here

For xcode 6.0 >

Download SimPholder 2.0 a


For xcode 5.1 <

Download SimPholders 1.5

Community
  • 1
  • 1
Paresh Navadiya
  • 38,095
  • 11
  • 81
  • 132
  • I am facing some problems installing this app on my mac. Let me work it out and see if it satisfies what I am looking for. Thanks. – learn_develop Nov 18 '14 at 08:59
1

in iOS 8 xcode provide core simulators. so you can find document directory folder using below code. you can write code in appDidFinishLaunching

NSLog(@"app directory : %@",[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
ChintaN -Maddy- Ramani
  • 5,156
  • 1
  • 27
  • 48