Classes
The following classes are available globally.
-
A helper class for running actions by name or by reference.
See moreDeclaration
Swift
public final class ActionRunner
-
An action that adds a custom event.
Expected argument values: A dictionary of keys for the custom event. When a custom event action is triggered from a Message Center Rich Push Message, the interaction type and ID will automatically be filled for the message if they are left blank.
Valid situations: All.
Result value: nil
See moreDeclaration
Swift
public final class AddCustomEventAction : AirshipAction
-
Adds tags.
Expected argument values:
String
(single tag),[String]
(single or multiple tags), or an object. An example tag group JSON payload: { “channel”: { “channel_tag_group”: [“channel_tag_1”, “channel_tag_2”], “other_channel_tag_group”: [“other_channel_tag_1”] }, “named_user”: { “named_user_tag_group”: [“named_user_tag_1”, “named_user_tag_2”], “other_named_user_tag_group”: [“other_named_user_tag_1”] }, “device”: [ “tag”, “another_tag”] }Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
,ActionSituation.manualInvocation
, andActionSituation.automation
Declaration
Swift
public final class AddTagsAction : AirshipAction
-
Main entry point for Airship. The application must call
See moretakeOff
withinapplication(_:didFinishLaunchingWithOptions:)
before accessing any instances on Airship or Airship modules.Declaration
Swift
public final class Airship : Sendable
-
NSNotificationCenter keys event names
See moreDeclaration
Swift
public final class AirshipNotifications
-
Airship core resources
See moreDeclaration
Swift
public final class AirshipCoreResources
-
Observable model for Airship embedded views
See moreDeclaration
Swift
@MainActor public final class AirshipEmbeddedObserver : ObservableObject
-
Exposes Scene controls to a custom view.
This class is an
See moreObservableObject
that can be used to control navigation flow, such as moving forward and backward, and locking the navigation. It is designed to be used with SwiftUI and must be accessed on the main actor.Declaration
Swift
@MainActor public class AirshipSceneController : ObservableObject
-
Scene manager Monitors scene connection and disconnection notifications and associated scenes to allow retrieving the latest scene.
See moreDeclaration
Swift
public final class AirshipSceneManager : AirshipSceneManagerProtocol, Sendable
-
The
See moreUtils
object provides an interface for utility methods.Declaration
Swift
public final class AirshipUtils
-
A singleton factory class to create and configure UIWindow objects. This allows apps to override behaviors like dark mode and other window-specific settings.
See moreDeclaration
Swift
@MainActor public final class AirshipWindowFactory
-
Application hooks required by Airship. If
See moreautomaticSetupEnabled
is enabled (enabled by default), Airship will automatically integrate these calls into the application by swizzling methods. IfautomaticSetupEnabled
is disabled, the application must call through to every method provided by this class.Declaration
Swift
public class AppIntegration
-
Airship custom view manager for displaying an app view in a Scene based layout.
See moreDeclaration
Swift
@MainActor public final class AirshipCustomViewManager : Sendable
-
Defines analytics identifiers to be associated with the device.
See moreDeclaration
Swift
public class AssociatedIdentifiers
-
Attributes editor.
See moreDeclaration
Swift
public final class AttributesEditor
-
Action that runs a block.
See moreDeclaration
Swift
public final class BlockAction : AirshipAction
-
Channel Capture copies the channelId to the device clipboard after a specific number of knocks (app foregrounds) within a specific timeframe. Channel Capture can be enabled or disabled in Airship Config.
See moreDeclaration
Swift
@available(tvOS, unavailable) @MainActor final public class DefaultAirshipChannelCapture : AirshipChannelCapture
-
A circular region defines a radius, and latitude and longitude from its center.
See moreDeclaration
Swift
public class CircularRegion
-
Opens a deep link URL.
Expected argument values: A valid URL String.
Valid situations: All but
See morebackgroundPush
andbackgroundInteractiveButton
Declaration
Swift
public final class DeepLinkAction : AirshipAction
-
Airship contact. A contact is distinct from a channel and represents a “user” within Airship. Contacts may be named and have channels associated with it.
See moreDeclaration
Swift
public final class DefaultAirshipContact : AirshipContact, @unchecked Sendable
extension DefaultAirshipContact: AirshipPushableComponent
extension DefaultAirshipContact: AirshipComponent
-
Action that produces an empty result.
See moreDeclaration
Swift
public final class EmptyAction : AirshipAction
-
Enables an Airship feature.
Expected argument values:
- “user_notifications”: To enable user notifications.
- “location”: To enable location updates.
- “background_location”: To enable location and allow background updates.
Valid situations:
See moreActionSituation.launchedFromPush
,ActionSituation.webViewInvocation
,ActionSituation.manualInvocation
,ActionSituation.foregroundInteractiveButton
, andActionSituation.automation
Declaration
Swift
public final class EnableFeatureAction : AirshipAction
-
Fetches device info.
Expected argument values: none.
Valid situations:
ActionSituation.launchedFromPush
,ActionSituation.webViewInvocation
,ActionSituation.manualInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
, andActionSituation.automation
Result value: JSON payload containing the device’s channel ID, named user ID, push opt-in status, location enabled status, and tags. An example response as JSON: { “channel_id”: “9c36e8c7-5a73-47c0-9716-99fd3d4197d5”, “push_opt_in”: true, “location_enabled”: true, “named_user”: “cool_user”, “tags”: [“tag1”, “tag2, "tag3”] }
See moreDeclaration
Swift
public final class FetchDeviceInfoAction : AirshipAction
-
A matcher for evaluating a JSON payload against a set of criteria.
See moreJSONMatcher
allows you to specify conditions for a JSON value, optionally at a specific key or nested path (scope
), and then evaluate if a given JSON object meets those conditions.Declaration
Swift
public final class JSONMatcher : NSObject, Sendable, Codable
-
Defines a predicate for evaluating a JSON payload.
See moreJSONPredicate
can be used to build complex logical conditions (AND
,OR
,NOT
) composed of multipleJSONMatcher
objects.Declaration
Swift
public final class JSONPredicate : NSObject, Sendable, Codable
-
A
JSONValueMatcher
is used to match a JSON value against a set of constraints.This class provides a flexible way to define conditions for JSON values, such as checking for equality, numerical ranges, presence of a value, version constraints, and conditions on array elements. It is
See moreCodable
, allowing it to be easily serialized and deserialized.Declaration
Swift
public final class JSONValueMatcher : NSObject, Sendable, Codable
-
The JavaScript environment builder that is used by the native bridge.
See moreDeclaration
Swift
public final class JavaScriptEnvironment : JavaScriptEnvironmentProtocol, Sendable
-
Modifies attributes.
An example JSON payload:
{ “channel”: { set: {“key”: value, … }, remove: [“attribute”, ….] }, “named_user”: { set: {“key”: value, … }, remove: [“attribute”, ….] } }
Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
,ActionSituation.manualInvocation
, andActionSituation.automation
Declaration
Swift
public final class ModifyAttributesAction : AirshipAction
-
Modify channel or contact tags.
Expected argument values: an array of mutations. An example add channel tags JSON payload: [ { “action”: “add”, “tags”: [ “channel_tag_1”, “channel_tag_2” ], “type”: “channel” }, { “action”: “remove”, “group”: “tag_group” “tags”: [ “contact_tag_1”, “contact_tag_2” ], “type”: “contact” } ]
Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
,ActionSituation.manualInvocation
, andActionSituation.automation
Declaration
Swift
public final class ModifyTagsAction : AirshipAction
-
The native bridge will automatically load the Airship JavaScript environment into whitlelisted sites. The native bridge must be assigned as the navigation delegate on a
See moreWKWebView
in order to function.Declaration
Swift
@MainActor public final class NativeBridge : NSObject, WKNavigationDelegate
-
Utility methods to create categories from plist files or dictionaries.
See moreDeclaration
Swift
public final class NotificationCategories
-
Opens a URL, either in safari or using custom URL schemes.
Expected argument values: A valid URL String.
Valid situations:
ActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.manualInvocation
, andActionSituation.automation
Result value: The input value.
See moreDeclaration
Swift
public final class OpenExternalURLAction : AirshipAction
-
Sets the pasteboard’s string.
Expected argument values: String or an Object with the pasteboard’s string under the ‘text’ key.
Valid situations:
ActionSituation.launchedFromPush
,ActionSituation.webViewInvocation
,ActionSituation.manualInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
, andActionSituation.automation
Result value: The arguments value.
See moreDeclaration
Swift
@available(tvOS, unavailable) public final class PasteboardAction : AirshipAction
-
Action that prompts for permission using
PermissionsManager
Expected arguments, dictionary with keys: -
enable_airship_usage
: Bool?. If related airship features should be enabled if the permission is granted. -fallback_system_settings
: Bool?. If denied, fallback to system settings. -permission
: String. The name of the permission.post_notifications
,bluetooth
,mic
,location
,contacts
,camera
, etc…Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
,ActionSituation.webViewInvocation
,ActionSituation.manualInvocation
,ActionSituation.foregroundInteractiveButton
, andActionSituation.automation
Declaration
Swift
public final class PromptPermissionAction : AirshipAction
-
A proximity region defines an identifier, major and minor.
See moreDeclaration
Swift
public class ProximityRegion
-
Links directly to app store review page or opens an app rating prompt.
This action is registered under the names rate_app_action and ^ra.
The rate app action requires your application to provide an itunes ID as an argument value, or have it set on the Airship Config
Config.itunesID
instance used for takeoff.Expected argument values:
show_link_prompt
: Optional Boolean, true to show prompt, false to link to the app store.itunes_id
: Optional String, the iTunes ID for the application to be rated.
Valid situations:
ActionSituation.foregroundPush
,ActionSituation.launchedFromPush
,ActionSituation.webViewInvocation
ActionSituation.manualInvocation
,ActionSituation.foregroundInteractiveButton
, andActionSituation.automation
Result value: nil
See moreDeclaration
Swift
public final class RateAppAction : AirshipAction, Sendable
-
A region event captures information regarding a region event for analytics.
See moreDeclaration
Swift
public class RegionEvent
-
Removes tags.
Expected argument values:
String
(single tag),[String]
(single or multiple tags), or an object. An example tag group JSON payload: { “channel”: { “channel_tag_group”: [“channel_tag_1”, “channel_tag_2”], “other_channel_tag_group”: [“other_channel_tag_1”] }, “named_user”: { “named_user_tag_group”: [“named_user_tag_1”, “named_user_tag_2”], “other_named_user_tag_group”: [“other_named_user_tag_1”] }, “device”: [ “tag”, “another_tag”] }Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
,ActionSituation.manualInvocation
andActionSituation.automation
Declaration
Swift
public final class RemoveTagsAction : AirshipAction
-
Airship config needed for runtime. Generated from
See moreAirshipConfig
during takeOff.Declaration
Swift
public final class RuntimeConfig : Sendable
-
Scoped subscription list editor.
See moreDeclaration
Swift
public class ScopedSubscriptionListEditor
-
Subscribes to/unsubscribes from a subscription list.
Valid situations:
See moreActionSituation.foregroundPush
,ActionSituation.launchedFromPush
ActionSituation.webViewInvocation
,ActionSituation.foregroundInteractiveButton
,ActionSituation.backgroundInteractiveButton
,ActionSituation.manualInvocation
, andActionSituation.automation
Declaration
Swift
public final class SubscriptionListAction : AirshipAction
-
Subscription list editor.
See moreDeclaration
Swift
public class SubscriptionListEditor
-
Tag editor.
See moreDeclaration
Swift
public class TagEditor
-
Tag groups editor.
See moreDeclaration
Swift
public class TagGroupsEditor