Saves document data to the specified location in the application sandbox.
- iOS 5.0+
The file URL identifying the location in the application sandbox to write the document data to. Typically, this is the URL obtained from the
A constant that indicates whether the document file is being written the first time or whether it is being overwritten. See
The default implementation of this method first calls the
contents(for method synchronously on the calling queue to get the document data to save. Then it calls the
write method on a background queue to perform the actual writing of the data to disk.
If you override this method, it’s recommended that you first call the superclass implementation of the method (
super). If you do not call
super, you must do two things: