learn_develop
learn_develop

Reputation: 1925

Document Folder for iOS 8.1 SDK

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.

Upvotes: 3

Views: 1744

Answers (3)

Paresh Navadiya
Paresh Navadiya

Reputation: 38239

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

Upvotes: 2

ChintaN -Maddy- Ramani
ChintaN -Maddy- Ramani

Reputation: 5164

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]);

Upvotes: 1

Eike
Eike

Reputation: 638

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]);

Upvotes: 3

Related Questions