次のコード行を使用して、大きなファイルを iCloud にアップロードしようとしています。
-(void)uploadFileWithFilePath:(NSString *)Path toFileURLInCloud:(NSURL *)destURL{
NSURL * filePath = [NSURL URLWithString:Path];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void)
{
NSFileCoordinator* fileCoordinator = [[NSFileCoordinator alloc] initWithFilePresenter:nil];
[fileCoordinator coordinateReadingItemAtURL:filePath
options:NSFileCoordinatorReadingWithoutChanges
error:nil
byAccessor:^(NSURL *newURL)
{
NSFileManager * fileManager = [[NSFileManager alloc] init];
NSError * error;
BOOL success = [fileManager copyItemAtURL:filePath toURL:destURL error:&error];
if (success) {
NSLog(@"Copied %@ to %@", filePath, destURL);
}
else {
NSLog(@"Failed to copy %@ to %@: %@", filePath, destURL, error.localizedDescription);
}
}];
});
}
このエラーが発生します
The operation couldn’t be completed. (Cocoa error 262.)
ここで何が問題になる可能性がありますか?