Type Method

writePlaceholder(at:withMetadata:)

Writes a document placeholder with the provided metadata.

Declaration

class func writePlaceholder(at placeholderURL: URL, withMetadata metadata: NSFileProviderItem) throws

Parameters

placeholderURL

The placeholder URL for the document. You can generate a placeholder URL from a document URL by calling placeholderURL(for:).

metadata

The metadata for this document.

Return Value

If the placeholder is written successfully, returns true; otherwise false.

Discussion

Call this method whenever you need to create a placeholder for a document. The metadata that you provide sets the data provided to the user in the browser interface.

See Also

Performing Actions

class func placeholderURL(for: URL) -> URL

Returns a placeholder URL for a given document URL.

func signalEnumerator(for: NSFileProviderItemIdentifier, completionHandler: (Error?) -> Void)

Alerts the system to changes in the specified folder's content.

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