Instance Method

readAdditionalContent(from:)

Handles reading non-Core Data content in the additional content directory in the document’s file package.

Declaration

func readAdditionalContent(from absoluteURL: URL) throws

Parameters

absoluteURL

The URL for the additional content directory in the document’s file package.

error

Upon return, if a problem occurs, contains an error object that describes the problem.

Return Value

true if the read operation is successful, otherwise false.

Discussion

You override this method to read non-Core Data content from the additional content directory in the document’s file package.

If you implement this method, it is invoked automatically by read(from:).

There is no need to invoke super’s implementation.

Special Considerations

Additional content is not supported on iCloud.

See Also

Customizing Read and Write Operations

func additionalContent(for: URL) -> Any

Handles writing non-Core Data content to the additional content directory in the document’s file package.

func writeAdditionalContent(Any, to: URL, originalContentsURL: URL?)

Handles writing non-Core Data content to the document’s file package.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software