Automatic APIs
MXOAutomaticInteractionAssignment
The configuration class used to assign a custom Interaction path to a View Controller.
open class MXOAutomaticInteractionAssignment : NSObject {
open var interaction: MXOInteraction? { get }
weak open var viewController: UIViewController? { get }
}
Property | Type | Description |
---|---|---|
interaction | MXOInteraction? | The MXO Interaction to assign to a View Controller. |
viewController | UIViewController? | The View Controller to assign an MXO Interaction path to. |
Create an instance using the Builder as shown below:
let assignment = MXOAutomaticInteractionAssignment { builder in
builder.interaction = MXOInteraction(withString: "")
builder.viewController = self
}
MXOAutomaticInteractionExclusion
The class to configure an exclusion of an automatic Interaction.
open class MXOAutomaticInteractionExclusion : NSObject {
weak open var viewController: UIViewController? { get }
}
Property | Type | Description |
---|---|---|
viewController | UIViewController? | The View Controller to exclude from Interaction tracking. |
Create an instance using the Builder as shown below:
let excludedInteraction = MXOAutomaticInteractionExclusion { builder in
builder.viewController = self
}
MXOAutomaticInteractionSubscriber
The subscriber for receiving automatic Interaction responses.
open class MXOAutomaticInteractionSubscriber : NSObject {
open var interaction: MXOInteraction { get }
open var onResponse: MXOAutomaticInteractionOnResponseBlock? { get }
}
Property | Type | Description |
---|---|---|
interaction | MXOInteraction | The MXO Interaction to subscribe. |
onResponse | MXOAutomaticInteractionOnResponseBlock? | Provide an MXO Interaction Response handler. |
Create an instance using the Builder as shown below:
let subscriber = MXOAutomaticInteractionSubscriber { builder in
builder.interaction = MXOInteraction(withString: "")
builder.onResponse = {
//process response
}
}
MXOAutomaticInteractionSubscription
The subscription protocol for an automatic Interaction.
public protocol MXOAutomaticInteractionSubscription : NSObjectProtocol {
var interaction: MXOInteraction! { get }
}
Property | Type | Description |
---|---|---|
interaction | MXOInteraction! | The MXO Interaction to subscribe. |
To unsubscribe from the automatic Interaction tracking use the following:
subscription?.unsubscribe()
MXOAutomaticInteractionTrackingConfiguration
The configuration object for MXO SDK Interaction tracking.
open class MXOAutomaticInteractionTrackingConfiguration : NSObject {
open var disableInteractionTracking: Bool { get }
open var disableOutboundLinkTracking: Bool { get }
}
Property | Type | Description |
---|---|---|
disableInteractionTracking | Bool | Set to true to disable Interaction tracking. |
disableOutboundLinkTracking | Bool | Set to true to disable updating outbound links. |
Create an instance using the Builder as shown below:
let interactionTrackingConfiguration = MXOAutomaticInteractionTrackingConfiguration { builder in
builder.disableInteractionTracking = false
builder.disableOutboundLinkTracking = false
}