Reputation: 3186
I've built a quick iOS app that will be used for surveys (Question/Answer style), saving the data locally to iPad, as there will be no internet access to upload straight away.
How is it possible to access the saved CSV, currently it's saving to the app document root. But from xCode/MacOS there is no way to access this location. Any better way of saving this to a more readily accessible location, or access where it currently is.
Currently using:
NSString *docPath=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0];
NSString *s2goevent=[docPath stringByAppendingPathComponent:@"results.csv"];
Upvotes: 0
Views: 922
Reputation: 1060
May not be a direct answer. But you can view the contents of the app including the different files stored in the device using the iexplorer mac app. http://www.macroplant.com/iexplorer/
Upvotes: 1
Reputation: 137
The easiest way would be to log the document folder location and open it in Finder.
NSLog(@"%@", docPath);
You should get a result like this:
/Users/<username>/Library/Application Support/iPhone Simulator/<simulator version>/Applications/<app id>/Documents
copy the url and go to Finder, then use the "Go To Folder..." menu (or press Cmd + Shift + G) and paste the url.
If the app is already on the device:
Upvotes: 1