Airship

@objc(UAirship)
public class Airship : NSObject

Airship manages the shared state for all Airship services. Airship.takeOff should be called from within your application delegate’s application:didFinishLaunchingWithOptions: method to initialize the shared instance.

  • A flag that checks if the Airship instance is available. true if available, otherwise false.

    Declaration

    Swift

    @objc
    public static var isFlying: Bool { get }
  • Airship config.

    Declaration

    Swift

    @objc
    public static var config: RuntimeConfig { get }
  • Action registry.

    Declaration

    Swift

    public static var actionRegistry: ActionRegistry { get }
  • The Airship permissions manager.

    Declaration

    Swift

    @objc
    public static var permissionsManager: AirshipPermissionsManager { get }
  • A user configurable UAJavaScriptCommandDelegate

    Note

    this delegate is not retained.

    Declaration

    Swift

    @objc
    public weak static var javaScriptCommandDelegate: JavaScriptCommandDelegate? { get set }
  • The channel capture utility.

    Declaration

    Swift

    @objc
    public static var channelCapture: ChannelCapture { get }
  • A user configurable deep link delegate.

    Note

    this delegate is not retained.

    Declaration

    Swift

    @objc
    public weak static var deepLinkDelegate: DeepLinkDelegate? { get set }
  • The URL allow list used for validating URLs for landing pages, wallet action, open external URL action, deep link action (if delegate is not set), and HTML in-app messages.

    Declaration

    Swift

    @objc(URLAllowList)
    public static var urlAllowList: URLAllowListProtocol { get }
  • The locale manager.

    Declaration

    Swift

    @objc
    public static var localeManager: AirshipLocaleManagerProtocol { get }
  • The privacy manager

    Declaration

    Swift

    @objc
    public static var privacyManager: AirshipPrivacyManager { get }
  • Shared Push instance.

    Declaration

    Swift

    public static var push: AirshipPushProtocol { get }
  • Shared Contact instance.

    Declaration

    Swift

    public static var contact: AirshipContactProtocol { get }
  • Shared Analytics instance.

    Declaration

    Swift

    public static var analytics: AirshipAnalyticsProtocol { get }
  • Shared Channel instance.

    Declaration

    Swift

    public static var channel: AirshipChannelProtocol { get }
  • Shared Channel instance.

    Declaration

    Swift

    @objc(channel)
    public static var _channel: AirshipBaseChannelProtocol { get }
  • Initializes Airship. Config will be read from AirshipConfig.plist.

    Declaration

    Swift

    @objc
    @MainActor
    public class func takeOff(
        launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    )

    Parameters

    launchOptions

    The launch options passed into application:didFinishLaunchingWithOptions:.

  • Initializes Airship.

    Declaration

    Swift

    @objc
    @MainActor
    public class func takeOff(
        _ config: AirshipConfig?,
        launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    )

    Parameters

    config

    The Airship config.

    launchOptions

    The launch options passed into application:didFinishLaunchingWithOptions:.

  • Initializes Airship. Config will be read from AirshipConfig.plist.

  • Initializes Airship.

  • Airship log handler. All Airship log will be routed through the handler.

    The default logger will os.Logger on iOS 14+, and print on older devices.

    Custom loggers should be set before takeOff.

    Declaration

    Swift

    @objc
    public static var logHandler: AirshipLogHandler { get set }
  • Airship log level. The log level defaults to .debug in developer mode, Sets the Airship log level. The log level defaults to .debug in developer mode, and .error in production. Values set before takeOff will be overridden by the value from the AirshipConfig.

    Declaration

    Swift

    @objc
    public static var logLevel: AirshipLogLevel { get set }