Removes the local copy of the specified item that’s stored in iCloud.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
The URL to a file or directory in iCloud storage.
On input, a pointer to variable for an
NSErrorobject. If an error occurs, this pointer is set to an
NSErrorobject containing information about the error. You may specify
nilto ignore the error information.
YES if the local item was removed successfully or
NO if it was not. If
NO is returned and
error is not
NSError object describing the error is returned in that parameter.
Don’t use a coordinated write to perform this operation. In macOS 10.7 or earlier, the framework takes a coordinated write in its implementation of this method, so taking one in your app causes a deadlock. In macOS 10.8 and later, the framework detects coordination done by your app on the same thread as the call to this method, to avoid deadlocking.
This method doesn’t remove the item from iCloud. It removes only the local version. You can then use
start to force iCloud to download a new version of the file or directory from the server.
To delete a file permanently from the user’s iCloud storage, use the regular
NSFile routines for deleting files and directories. Remember that deleting items from iCloud can’t be undone. Once deleted, the item is gone forever.