Initializes the receiver with the specified definition.


init?(definition dict: [String : Any]?, fromArchive archived: Bool)



Describes the action, including any custom definition properties.


If the receiver is being unarchived, true, otherwise false.

Return Value

The initialized action.


This is the primary initializer for all Automator classes. The Automator application sends this message to instances of AMAction both when it loads actions bundles and when it unarchives them.

The AMAction object being instantiated should perform whatever initializations are necessary after invoking super’s implementation of this method. It can then examine the values in dict, particularly if the receiver had been archived with custom definition properties.

See Also

Initialization and encoding

init(contentsOf: URL)

Loads an Automator action from a file URL.

func write(to: NSMutableDictionary)

Examines the parameters and other configuration information specified in the passed dictionary and adds its own information to it if appropriate.