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.

  • Notification when Airship is ready.

    Declaration

    Swift

    @objc
    public static let airshipReadyNotification: NSNotification.Name
  • Airship ready channel ID key. Only available if extendedBroadcastEnabled is true in config.

    Declaration

    Swift

    @objc
    public static let airshipReadyChannelIdentifier: String
  • Airship ready app key. Only avaialble if extendedBroadcastEnabled is true in config.

    Declaration

    Swift

    @objc
    public static let airshipReadyAppKey: String
  • Airship ready payload version. Only available if extendedBroadcastEnabled is true in config.

    Declaration

    Swift

    @objc
    public static let airshipReadyPayloadVersion: String
  • 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 var config: RuntimeConfig { get }
  • Action registry.

    Declaration

    Swift

    @objc
    public var actionRegistry: ActionRegistry { get }
  • Stores common application metrics such as last open.

    Declaration

    Swift

    @objc
    public var applicationMetrics: ApplicationMetrics { get }
  • The Airship permissions manager.

    Declaration

    Swift

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

    Note

    this delegate is not retained.

    Declaration

    Swift

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

    Declaration

    Swift

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

    Note

    this delegate is not retained.

    Declaration

    Swift

    @objc
    public weak 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 var urlAllowList: URLAllowList { get }
  • The locale manager.

    Declaration

    Swift

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

    Declaration

    Swift

    @objc
    public var privacyManager: PrivacyManager { get }
  • Shared Airship instance.

    Declaration

    Swift

    @objc
    public static var shared: Airship { get }
  • Shared Push instance.

    Declaration

    Swift

    @objc
    public static var push: Push { get }
  • Shared Contact instance.

    Declaration

    Swift

    @objc
    public static var contact: Contact { get }
  • Shared Analytics instance.

    Declaration

    Swift

    @objc
    public static var analytics: Analytics { get }
  • Shared Channel instance.

    Declaration

    Swift

    @objc
    public static var channel: Channel { get }
  • Shared NamedUser instance.

    Declaration

    Swift

    @objc
    public static var namedUser: NamedUser { get }
  • Initalizes Airship. Config will be read from AirshipConfig.plist.

    Declaration

    Swift

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

    Parameters

    launchOptions

    The launch options passed into application:didFinishLaunchingWithOptions:.

  • Initalizes Airship.

    Declaration

    Swift

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

    Parameters

    config

    The Airship config.

    launchOptions

    The launch options passed into application:didFinishLaunchingWithOptions:.

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

  • Initalizes 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: LogLevel { get set }