用上篇文章中的方法,讓文件不備份到iCloud中出現CFURLSetResourcePropertyForKey failed because it was passed this URL which has no scheme錯誤
錯誤原因:
因為(BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)fileURL,傳過來的fileURL格式為
NSURL *fileURL =[NSURL URLWithString:localFilePath];
改為以下即可
NSURL *fileURL =[NSURL fileURLWithPath:localFilePath];