InAppAutomation

public final class InAppAutomation : Sendable

Provides a control interface for creating, canceling and executing in-app automations.

  • In-App Messaging

    Declaration

    Swift

    public let inAppMessaging: InAppMessagingProtocol
  • Legacy In-App Messaging

    Declaration

    Swift

    public var legacyInAppMessaging: LegacyInAppMessagingProtocol { get }
  • The shared InAppAutomation instance. Airship.takeOff must be called before accessing this instance.

    Declaration

    Swift

    public static var shared: InAppAutomation { get }
  • Paused state of in-app automation.

    Declaration

    Swift

    @MainActor
    public var isPaused: Bool { get set }
  • upsertSchedules(_:) Asynchronous

    Creates the provided schedules or updates them if they already exist.

    Declaration

    Swift

    public func upsertSchedules(_ schedules: [AutomationSchedule]) async throws

    Parameters

    schedules

    The schedules to create or update.

  • Cancels an in-app automation via its schedule identifier.

    Declaration

    Swift

    public func cancelSchedule(identifier: String) async throws

    Parameters

    identifier

    The schedule identifier to cancel.

  • Cancels multiple in-app automations via their schedule identifiers.

    Declaration

    Swift

    public func cancelSchedule(identifiers: [String]) async throws

    Parameters

    identifiers

    The schedule identifiers to cancel.

  • Cancels multiple in-app automations via their group.

    Declaration

    Swift

    public func cancelSchedules(group: String) async throws

    Parameters

    group

    The group to cancel.

  • Gets the in-app automation with the provided schedule identifier.

    Declaration

    Swift

    public func getSchedule(identifier: String) async throws -> AutomationSchedule?

    Parameters

    identifier

    The schedule identifier.

    Return Value

    The in-app automation corresponding to the provided schedule identifier.

  • getSchedules(group:) Asynchronous

    Gets the in-app automation with the provided group.

    Declaration

    Swift

    public func getSchedules(group: String) async throws -> [AutomationSchedule]

    Parameters

    identifier

    The group to get.

    Return Value

    The in-app automation corresponding to the provided group.