IOS File Creation Accessible To All Apps -
i need create html , pdf file within app , save in documents directory. file contains user transaction details particular period. able save file in documents directory.
but how make accessible other apps.i able create .pdf files when tried view same using adobe reader, file not listing.
please share ideas can view files saving app accessed outside app also.
i created html file in app's documents directory. within app, listing files saved user.
nsstring *docsfolder = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes)[0]; nsstring *filename = [docsfolder stringbyappendingpathcomponent:[nsstring stringwithformat:@"statement_%@_%@_to_%@.html",[selectedacct substringfromindex:max((int)[selectedacct length]-5, 0)],strfromdate,strtodate]]; nserror *error; [html writetofile:filename atomically:no encoding:nsutf8stringencoding error:&error]; if(error != nil){ uialert ---> "error message" } else { uialert ---> "success message" }
all applications written using ios sdk on iphone sandboxed. means run in own space.
currently it's not possible share apps documents folder (with exception of extensions).
instead should consider using icloud documents api.
Comments
Post a Comment