Instance Method

cancelRequest(withError:)

Tells the host app to cancel the app extension request, with a supplied error.

Declaration

func cancelRequest(withError error: Error)

Parameters

error

The error object to return. It must be non-nil.

Discussion

On return, the userInfo dictionary of the NSError object contains a key named NSExtensionItemsAndErrorsKey which has as its value a dictionary of NSExtensionItem objects and associated NSError instances.

See Also

Handling Requests

func completeRequest(returningItems: [Any]?, completionHandler: ((Bool) -> Void)?)

Tells the host app to complete the app extension request with an array of result items.