objective c - Apps must follow the iOS Data Storage Guidelines or they will be rejected in app that contains .pdf -


i have created ebook , epaper app , app contains lot of images , pdf files , putting downloaded images , pdf files documents directory

image directory:

           nsstring *strpageurl = [dictpage valueforkey:@"imagelink"];             strpageurl = [strpageurl stringbyreplacingoccurrencesofstring:@"\n" withstring:@""];             strpageurl = [strpageurl stringbyreplacingoccurrencesofstring:@"\t" withstring:@""];             strpageurl = [strpageurl stringbyreplacingoccurrencesofstring:@" " withstring:@""];              nsstring* strfilename = [strpageurl lastpathcomponent];             nsstring *strdestfile = [nshomedirectory() stringbyappendingpathcomponent:[nsstring stringwithformat:@"documents/%@",strfilename]]; 

pdf directory

          nsstring *strthumburl = [dictpage valueforkey:@"thumbimage"];             //  nslog(@"%@",strthumburl);             nsstring* strthumbname = [strthumburl lastpathcomponent];             nsstring *strthumbpath = [nshomedirectory() stringbyappendingpathcomponent:[nsstring stringwithformat:@"documents/%@",strthumbname]];              bool fileexists = [[nsfilemanager defaultmanager] fileexistsatpath:strthumbpath]; 

how prevent files being backed icloud , itunes?

--------------------------how implement method in code-----------------------------------

- (bool)addskipbackupattributetoitematurl:(nsurl *)url { assert([[nsfilemanager defaultmanager] fileexistsatpath: [url path]]);  nserror *error = nil; bool success = [url setresourcevalue: [nsnumber numberwithbool: yes]                               forkey: nsurlisexcludedfrombackupkey error: &error]; if(!success){     nslog(@"error excluding %@ backup %@", [url lastpathcomponent], error); } return success; } 

yes app may rejected if download large data , store in documents directory. have faced problem.

read more here ios 5 not allow store downloaded data in documents directory?

adding "do not backup" attribute folder hierarchy in ios 5.0.1


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -