Excluding files from iCloud backup

后端 未结 2 1125
谎友^
谎友^ 2021-01-22 22:25

I\'m using iOS 5.1 I use this peace of code

[pathURL setResourceValue:[NSNumber numberWithBool:YES]
                   forKey:NSURLIsExcludedFromBackupKey
               


        
相关标签:
2条回答
  • 2021-01-22 22:37

    It's worth to note that you can't just set the flag on NSHomeDirectory(). It has to be internal to that path.

    0 讨论(0)
  • 2021-01-22 22:40

    Finally I found the solution by myself The clue is to apply NSURLIsExcludedFromBackupKey to root folder not to every file you want to exclude from backup

    so at very beginning you should call this with (for example) "Library/Application Support" folder

    0 讨论(0)
提交回复
热议问题