我如何确保使用模拟器为所有文件/文件夹正确设置 NSURLIsExcludedFromBackupKey(我目前没有可用的真实设备)?
最佳答案
您可以使用以下方式检查:
NSError *error;
id enabledFlag = nil;
[yourFileURL getResourceValue: &enabledFlag forKey: NSURLIsExcludedFromBackupKey error: &error];
NSLog (@"NSURLIsExcludedFromBackupKey enabled %@", enabledFlag)
但无法使用模拟器中存在的 iCloud 选项进行检查。
关于ios - 如何确保在模拟器中设置了 NSURLIsExcludedFromBackupKey ist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27610565/