objective c - Accessing NSDocumentDirectory on iPad Simulator -


i've added simple .csv file app's nsdocumentdirectory using:

-(ibaction)exportmodule:(id)sender{     nsstring *filename = @"exportedfile.csv";     nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);     nsstring *documentsdirectory = [paths objectatindex:0];       nsstring *exportstring = @"i've,been,exported";     nsdata *testdata=[exportstring datausingencoding:nsutf8stringencoding];     nsstring *docdir = documentsdirectory;     nsstring *completepath = [docdir stringbyappendingpathcomponent:filename];     [testdata writetofile:completepath atomically:yes];      if ([[nsfilemanager defaultmanager] fileexistsatpath:completepath]) {     nslog(@"theres file here!");     }  } 

the app gets if statement printing "theres file here!", open file , see if there problems in formatting .csv.

if running on physical device, i'd able open in itunes , take there, there way examine .csv while using simulator?

i have @ beginning of of programs using simulator

nslog(@"documents: %@", [nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) objectatindex:0]); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -