MCEWatchActionRegistry Class Reference

Inherits from NSObject
Declared in MCEWatchActionRegistry.h
MCEWatchActionRegistry.m

+ sharedInstance

This method returns the singleton object of this class.

+ (instancetype)sharedInstance

Discussion

This method returns the singleton object of this class.

Declared In

MCEWatchActionRegistry.h

– registerTarget:withSelector:forAction:

This method is used to register an object to receive action messages for a specified action type name.

- (BOOL)registerTarget:(id)target withSelector:(SEL)selector forAction:(NSString *)type

Parameters

target

the object that will accept action messages

selector

a selector that processes the action, can either take one or two arguments. The first argument is always the action payload and the second, if included is the full APNS payload.

type

action the specified action type name to be used in the APNS payload as the type value

Return Value

TRUE or FALSE depending if the registration was successful or not.

Discussion

This method is used to register an object to receive action messages for a specified action type name.

Declared In

MCEWatchActionRegistry.h

– performAction:forPayload:source:attributes:

This method performs the registered specified action for the APNS payload.

- (void)performAction:(NSDictionary *)action forPayload:(NSDictionary *)payload source:(NSString *)source attributes:(NSDictionary *)attributes

Parameters

action

the action dictionary to be executed. (either the “notification-action” or one of the “category-actions”)

payload

the full APNS payload

source

the event type value to report

attributes

Additional attributes for event payload

Discussion

This method performs the registered specified action for the APNS payload.

Declared In

MCEWatchActionRegistry.h