iphone - Prevent files from being backed up to iCloud -


i want save file document folder , don't want icloud backing up, saw can use method:

- (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;  } 

and want ask if need call every time create new file in document folder?

whenever create file or folder should not backed up, write data file , call method, passing in url file. instead of it, can call method document folder once.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -