objective c - download .zip or .doc file on iphone -


i want download .zip or .pdf or .doc file on iphone server via webservice request , webservice deploy on iis.

i dont know

this piece code downloads pdf , saves temporary location

nsdata *pdfdata = [nsdata  datawithcontentsofurl:pdfurl]; nsstring *filename = [[pdfurl path] lastpathcomponent]; nsstring *filepath = [nstemporarydirectory() stringbyappendingpathcomponent:filename]; nsurl *fileurl = [nsurl fileurlwithpath:filepath]; nserror *writeerror = nil; [pdfdata writetourl: fileurl options:0 error:&writeerror]; if( writeerror) {    nslog(@" error in writing file %@' : \n %@ ", filepath , writeerror );                                             return; } nslog(@"%@",fileurl); 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -