Instance Method

eventDidFail(_:withError:)

Sent by an SBApplication object when a target application returns an error Apple event.

Required.

Declaration

func eventDidFail(_ event: UnsafePointer<AppleEvent>, withError error: Error) -> Any?

Parameters

event

A pointer to the Apple event sent to the target application causing the error.

error

An object containing information about the error Apple event. Specific information may be included in the useInfo dictionary of the error object. See User Info Dictionary Keys for a list of possible keys for this dictionary.

Return Value

If you return a result, it will become the result of the sendEvent(_:) that failed. Can be nil.