Instances of the AMBundleAction class manage Automator actions that are loadable bundles. Automator loads action bundles from standard locations in the file system: /System/Library/Automator, /Library/Automator, and ~/Library/Automator.


@interface AMBundleAction : AMAction


AMBundleAction objects have several important properties:

  • The NSBundle object associated with the action’s physical bundle

  • The action’s view, which holds its user interface

  • A parameters dictionary that reflects the settings in the user interface

When you create a Cocoa Automator Action project in Xcode, the project template includes a custom subclass of AMBundleAction. (This custom class is given the name of the project.) The sole requirement for this custom class is to provide an implementation of runWithInput:error:, which is declared by the superclass AMAction.

Subclassing Notes

As noted in the Overview section, the Xcode project templates for Automator actions includes partially completed header and source files for a custom subclass of AMBundleAction. The name of this custom class is the name of the Xcode project. To complete the implementation of this subclass, you must override runWithInput:error: (declared by AMAction).

Methods to Override

To subclass AMBundleAction, you must override the runWithInput:error: to implement the task performed by the action. If you have added any instance variables, you must override the initWithDefinition:fromArchive: method and the writeToDictionary: method of AMAction to work with them.


Initializing the action

- awakeFromBundle

Sent to the receiver when all objects in its bundle have been unarchived.

- initWithDefinition:fromArchive:

Initializes and returns an allocated AMBundleAction object.

Setting and getting action properties


Returns the receiver’s bundle object.


Returns whether the receiver has a view associated with it.


Returns the receiver’s view object.


Returns the receiver's parameters.


Inherits From