Writes a property list representation of the contents of the dictionary to a given URL.
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 11.0+
- watchOS 4.0+
The URL to which to write the dictionary.
This method recursively validates that all the contained objects are property list objects (instances of
NSDictionary) before writing out the file. The method throws an error if all the objects are not property list objects, because the resulting output wouldn’t be a valid property list.
If the dictionary’s contents are all property list objects, you can use the location written by this method to initialize a new dictionary with the instance method
If you need greater control over the property list representation, use
For more information about property lists, see Property List Programming Guide.