Reputation: 1925
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
Reputation: 38239
Upvotes: 2
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
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