XAAction Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | NSCoding NSCopying |
| Declared in | XAAction.h |
Overview
An action describes one of the possible options for recognition and workflow to be complete if the action is recognized. The potential actions are represented by the XAActionType enum.
Initialize an XAAction Object
+ actionWith:
Create a new action with a dictionary of values
+ (nullable XAAction *)actionWith:(nonnull NSDictionary *)valuesParameters
values |
Dictionary of values that are used to build the action. |
|---|
Return Value
A new action
Discussion
Create a new action with a dictionary of values
Declared In
XAAction.h
Universal Action Data
actionType
XAActionType of the action.
@property (nonatomic, readonly) enum XAActionType actionTypeDiscussion
XAActionType of the action.
See Also
Declared In
XAAction.h
phrase
The phrase for the action to be recognized.
@property (nonnull, nonatomic, retain, readonly) NSString *phraseDiscussion
The phrase for the action to be recognized.
Declared In
XAAction.h
trailingAudio
The trailing audio for the current state, either background or foreground.
@property (nullable, nonatomic, retain, readonly) NSObject<XAPlaying> *trailingAudioDiscussion
The trailing audio for the current state, either background or foreground.
Declared In
XAAction.h
trailingAudioForeground
Audio that is played, after the action is recognized, when the action is executed in the foreground
@property (nullable, nonatomic, retain, readonly) NSObject<XAPlaying> *trailingAudioForegroundDiscussion
Audio that is played, after the action is recognized, when the action is executed in the foreground
Declared In
XAAction.h
trailingAudioBackground
Audio that is played, after the action is recognized, when the action is executed in the background.
@property (nullable, nonatomic, retain, readonly) NSObject<XAPlaying> *trailingAudioBackgroundDiscussion
Audio that is played, after the action is recognized, when the action is executed in the background.
Declared In
XAAction.h
linear
Linear creative assocaited with the action
@property (nullable, nonatomic, retain, readonly) XALinear *linearDiscussion
Linear creative assocaited with the action
Declared In
XAAction.h
url
The URL for the action.
@property (nullable, nonatomic, retain, readonly) NSURL *urlDiscussion
The URL for the action.
Declared In
XAAction.h
trackingEvents
URL that a HTTP GET is performed when the action is performed, used for tracking the action.
@property (nonnull, nonatomic, retain, readonly) NSArray *trackingEventsDiscussion
URL that a HTTP GET is performed when the action is performed, used for tracking the action.
Declared In
XAAction.h
data
Metadata associated with the action, used for an XAActionTypeCustom (see XAActionType) action
@property (nullable, nonatomic, retain, readonly) NSString *dataDiscussion
Metadata associated with the action, used for an XAActionTypeCustom (see XAActionType) action
Declared In
XAAction.h
Helper Methods
– actionTypeAsString
Returns the actionType of the action as a human readable string (instead of an integer).
- (nullable NSString *)actionTypeAsStringReturn Value
A human readable string for the action type.
Discussion
Returns the actionType of the action as a human readable string (instead of an integer).
Declared In
XAAction.h
+ stringAsActionType:
Convert a string to an XAActionType.
+ (enum XAActionType)stringAsActionType:(nonnull NSString *)actionTypeParameters
actionType |
A string representation of the XAActionType, one of the |
|---|
Return Value
The XAActionType that matches the provided string, if no match XAActionTypeUnspecified
is returned
Discussion
Convert a string to an XAActionType.
Used internal to XAPPKit when converting the JSON payload to executable actions.
Declared In
XAAction.h
+ actionTypeAsString:
Convert the XAActionType to a human readable string, one of the XAActionTypeString constants
+ (nullable NSString *)actionTypeAsString:(enum XAActionType)actionTypeParameters
actionType |
Action type to translate to a string |
|---|
Return Value
Returns a string representation of the provided XAActionType
Discussion
Convert the XAActionType to a human readable string, one of the XAActionTypeString constants
Declared In
XAAction.h