Airship
public final class Airship : Sendable
Main entry point for Airship. The application must call takeOff
within application(_:didFinishLaunchingWithOptions:)
before accessing any instances on Airship or Airship modules.
-
A flag that checks if the Airship instance is available.
true
if available, otherwisefalse
.Declaration
Swift
public static var isFlying: Bool { get }
-
Airship config.
Declaration
Swift
public static var config: RuntimeConfig { get }
-
Action registry.
Declaration
Swift
public static var actionRegistry: ActionRegistry { get }
-
The Airship permissions manager.
Declaration
Swift
public static var permissionsManager: AirshipPermissionsManager { get }
-
A user configurable UAJavaScriptCommandDelegate
Note
this delegate is not retained.Declaration
Swift
public weak static var javaScriptCommandDelegate: (any JavaScriptCommandDelegate)? { get set }
-
The channel capture utility.
Declaration
Swift
public static var channelCapture: ChannelCapture { get }
-
A user configurable deep link delegate.
Note
this delegate is not retained.Declaration
Swift
public weak static var deepLinkDelegate: (any 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
public static var urlAllowList: any URLAllowListProtocol { get }
-
The locale manager.
Declaration
Swift
public static var localeManager: any AirshipLocaleManagerProtocol { get }
-
The privacy manager
Declaration
Swift
public static var privacyManager: AirshipPrivacyManager { get }
-
Shared Push instance.
Declaration
Swift
public static var push: any AirshipPushProtocol { get }
-
Shared Contact instance.
Declaration
Swift
public static var contact: any AirshipContactProtocol { get }
-
Shared Analytics instance.
Declaration
Swift
public static var analytics: any AirshipAnalyticsProtocol { get }
-
Shared Channel instance.
Declaration
Swift
public static var channel: any AirshipChannelProtocol { get }
-
Initializes Airship. If any errors are found with the config or if Airship is already intiialized it will throw with the error.
Declaration
Swift
@MainActor public class func takeOff( _ config: AirshipConfig? = nil, launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) throws
Parameters
config
The Airship config. If nil, config will be loading from a plist.
launchOptions
The launch options passed into
application:didFinishLaunchingWithOptions:
. -
Initializes Airship. If any errors are found with the config or if Airship is already intiialized it will throw with the error.
-
On ready callback gets called immediately when ready otherwise gets called immediately after takeoff
Declaration
Swift
@MainActor public static func onReady(callback: @MainActor @Sendable @escaping () -> Void)
Parameters
callback
callback closure that’s called when Airship is ready