Classes

The following classes are available globally.

  • AccountEventTemplate represents a custom account event template for the application.

    See more

    Declaration

    Swift

    @objc(UAAccountEventTemplate)
    public class AccountEventTemplate : NSObject
  • This class is responsible for runtime-persisting actions and associating them with names and predicates.

    See more

    Declaration

    Swift

    @objc(UAActionRegistry)
    public class ActionRegistry : NSObject
  • An action registry entry.

    See more

    Declaration

    Swift

    @objc(UAActionRegistryEntry)
    public class ActionRegistryEntry : NSObject
  • A helper class for running actions by name or by reference.

    See more

    Declaration

    Swift

    @objc(UAActionRunner)
    public class ActionRunner : NSObject
  • An action that adds a custom event.

    This action is registered under the name “add_custom_event_action”.

    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: UASituationForegroundPush, UASituationLaunchedFromPush, UASituationWebViewInvocation, UASituationManualInvocation, UASituationBackgroundPush, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, and UASituationAutomation

    Result value: nil

    Fetch result: UAActionFetchResultNoData

    Default predicate: Only accepts UASituationWebViewInvocation and UASituationManualInvocation

    Declaration

    Swift

    @objc(UAAddCustomEventAction)
    public class AddCustomEventAction : NSObject, Action
  • Default predicate for the add custom event action.

    Declaration

    Swift

    @objc(UAAddCustomEventActionPredicate)
    public class AddCustomEventActionPredicate : NSObject, ActionPredicateProtocol
  • Adds tags. This Action is registered under the names ^+t and “add_tags_action”.

    Expected argument values: NSString (single tag), NSArray (single or multiple tags), or NSDictionary (tag groups). 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: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Default predicate: Rejects foreground pushes with visible display options

    Result value: nil

    Error: nil

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UAAddTagsAction)
    public class AddTagsAction : ModifyTagsAction
  • Convenience class for aggregating and merging multiple UAActionResults.

    See more

    Declaration

    Swift

    @objc(UAAggregateActionResult)
    public class AggregateActionResult : ActionResult
  • 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.

    See more

    Declaration

    Swift

    @objc(UAirship)
    public class Airship : NSObject
  • The Analytics object provides an interface to the Airship Analytics API.

    See more

    Declaration

    Swift

    @objc(UAAnalytics)
    public class Analytics : NSObject, Component, AnalyticsProtocol, EventManagerDelegate
  • Application hooks required by Airship. If automaticSetupEnabled is enabled (enabled by default), Airship will automatically integrate these calls into the application by swizzling methods. If automaticSetupEnabled is disabled, the application must call through to every method provided by this class.

    See more

    Declaration

    Swift

    @objc(UAAppIntegration)
    public class AppIntegration : NSObject
  • The ApplicationMetrics class keeps track of application-related metrics.

    See more

    Declaration

    Swift

    @objc(UAApplicationMetrics)
    public class ApplicationMetrics : NSObject
  • Associated channel data.

    See more

    Declaration

    Swift

    @objc(UAAssociatedChannel)
    public class AssociatedChannel : NSObject, Codable
  • Defines analytics identifiers to be associated with the device.

    See more

    Declaration

    Swift

    @objc(UAAssociatedIdentifiers)
    public class AssociatedIdentifiers : NSObject
  • Defines attributes mutations.

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "Use Contact#editAttributes(﹚ or Channel#editAttributes(﹚ instead.")
    @objc(UAAttributeMutations)
    public class AttributeMutations : NSObject
  • Predefined attributes.

    See more

    Declaration

    Swift

    @objc(UAAttributes)
    public class Attributes : NSObject
  • Default predicate for the modify attributes action.

    Declaration

    Swift

    @objc(UAAttributesActionPredicate)
    public class AttributesActionPredicate : NSObject, ActionPredicateProtocol
  • Attributes editor.

    See more

    Declaration

    Swift

    @objc(UAAttributesEditor)
    public class AttributesEditor : NSObject
  • A circle with an X in it, drawn to fill the frame.

    Declaration

    Swift

    @objc(UABespokeCloseView)
    public class BespokeCloseView : UIView
  • An abstraction around a nicer looking loading indicator that embeds a UIActivityIndicatorView in a translucent black beveled rect.

    See more

    Declaration

    Swift

    @objc(UABeveledLoadingIndicator)
    public class BeveledLoadingIndicator : UIView
  • This singleton provides an interface to the channel functionality.

    See more

    Declaration

    Swift

    @objc(UAChannel)
    public class Channel : NSObject, Component, ChannelProtocol
  • 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 more

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objc(UAChannelCapture)
    public class ChannelCapture : NSObject
  • Channel scopes.

    See more

    Declaration

    Swift

    @objc(UAChannelScopes)
    public class ChannelScopes : NSObject, Decodable
  • A circular region defines a radius, and latitude and longitude from its center.

    See more

    Declaration

    Swift

    @objc(UACircularRegion)
    public class CircularRegion : NSObject
  • The Config object provides an interface for passing common configurable values to UAirship. The simplest way to use this class is to add an AirshipConfig.plist file in your app’s bundle and set the desired options.

    See more

    Declaration

    Swift

    @objc(UAConfig)
    public class Config : NSObject, NSCopying
  • 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 more

    Declaration

    Swift

    @objc(UAContact)
    public class Contact : NSObject, Component, ContactProtocol
  • Contact data.

    See more

    Declaration

    Swift

    @objc(UAContactData)
    public class ContactData : NSObject
  • CustomEvent captures information regarding a custom event for Analytics.

    See more

    Declaration

    Swift

    @objc(UACustomEvent)
    public class CustomEvent : NSObject, Event
  • Opens a deep link URL. This action is registered under the names ^d and deep_link_action.

    Expected argument values: NSString

    Valid situations: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Result value: An NSString representation of the input

    Error: Iif the URL could not be opened

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UADeepLinkAction)
    public class DeepLinkAction : NSObject, Action
  • Email registration options

    See more

    Declaration

    Swift

    @objc(UAEmailRegistrationOptions)
    public class EmailRegistrationOptions : NSObject, Codable
  • Action that produces an empty result.

    See more

    Declaration

    Swift

    @objc(UAEmptyAction)
    public class EmptyAction : NSObject, Action
  • Enables an Airship feature.

    This action is registered under the names enable_feature and ^ef.

    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: UASituationLaunchedFromPush, UASituationWebViewInvocation, UASituationManualInvocation, UASituationForegroundInteractiveButton, and UASituationAutomation

    Default predicate: Rejects foreground pushes with visible display options.

    Result value: Empty.

    Declaration

    Swift

    @objc(UAEnableFeatureAction)
    public class EnableFeatureAction : NSObject, Action
  • Default predicate for the enable feature action.

    Declaration

    Swift

    @objc(UAEnableFeatureActionPredicate)
    public class EnableFeatureActionPredicate : NSObject, ActionPredicateProtocol
  • Fetches device info.

    This action is registered under the names fetch_device_info and ^fdi.

    Expected argument values: none.

    Valid situations: UASituationLaunchedFromPush, UASituationWebViewInvocation, UASituationManualInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, and UASituationAutomation

    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”] }

    Default Registration Predicate: Only accepts UASituationManualInvocation and UASituationWebViewInvocation

    Declaration

    Swift

    @objc(UAFetchDeviceInfoAction)
    public class FetchDeviceInfoAction : NSObject, Action
  • Default predicate for the fetch device info action.

    Declaration

    Swift

    @objc(UAFetchDeviceInfoActionPredicate)
    public class FetchDeviceInfoActionPredicate : NSObject, ActionPredicateProtocol
  • Event to track install attributions.

    See more

    Declaration

    Swift

    @objc(UAInstallAttributionEvent)
    public class InstallAttributionEvent : NSObject, Event
  • Matcher for a JSON payload.

    See more

    Declaration

    Swift

    @objc(UAJSONMatcher)
    public class JSONMatcher : NSObject
  • Predicate for JSON payloads.

    See more

    Declaration

    Swift

    @objc(UAJSONPredicate)
    public class JSONPredicate : NSObject
  • Defines a JSON value matcher.

    See more

    Declaration

    Swift

    @objc(UAJSONValueMatcher)
    public class JSONValueMatcher : NSObject
  • The JavaScript environment builder that is used by the native bridge.

    See more

    Declaration

    Swift

    @objc(UAJavaScriptEnvironment)
    public class JavaScriptEnvironment : NSObject, JavaScriptEnvironmentProtocol
  • Airship locale manager.

    See more

    Declaration

    Swift

    @objc(UALocaleManager)
    public class LocaleManager : NSObject, LocaleManagerProtocol
  • A MediaEventTemplate represents a custom media event template for the application.

    See more

    Declaration

    Swift

    @objc(UAMediaEventTemplate)
    public class MediaEventTemplate : NSObject
  • Modifies attributes This Action is registered under the names ^a and “modify_attributes_action”.

    An example JSON payload:

    { “channel”: { set: {“key”: value, … }, remove: [“attribute”, ….] }, “named_user”: { set: {“key”: value, … }, remove: [“attribute”, ….] } }

    Valid situations: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Default predicate: Rejects foreground pushes with visible display options

    Result value: nil

    Error: nil

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UAModifyAttributesAction)
    public class ModifyAttributesAction : NSObject, Action
  • This is the base class for AddTagsAction and RemoveTagsAction.

    Declaration

    Swift

    @objc(UAModifyTagsAction)
    public class ModifyTagsAction : NSObject, Action
  • DEPRECATED. Use contact instead. The named user is an alternate method of identifying the device. Once a named user is associated to the device, it can be used to send push notifications to the device.

    See more

    Declaration

    Swift

    @objc(UANamedUser)
    public class NamedUser : NSObject, Component
  • 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 WKWebView in order to function.

    See more

    Declaration

    Swift

    @objc(UANativeBridge)
    public class NativeBridge : NSObject, WKNavigationDelegate
  • Utility methods to create categories from plist files or dictionaries.

    See more

    Declaration

    Swift

    @objc(UANotificationCategories)
    public class NotificationCategories : NSObject
  • Opens a URL, either in safari or using custom URL schemes. This action is registered under the names ^u and open_external_url_action.

    Expected argument values: NSString

    Valid situations: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Result value: An NSString representation of the input

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UAOpenExternalURLAction)
    public class OpenExternalURLAction : NSObject, Action
  • Open registration options

    See more

    Declaration

    Swift

    @objc(UAOpenRegistrationOptions)
    public class OpenRegistrationOptions : NSObject, Codable
  • Sets the pasteboard’s string.

    This action is registered under the names clipboard_action and ^c.

    Expected argument values: NSString or an NSDictionary with the pasteboard’s string under the ‘text’ key.

    Valid situations: UASituationLaunchedFromPush, UASituationWebViewInvocation, UASituationManualInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, and UASituationAutomation

    Result value: The arguments value.

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objc(UAPasteboardAction)
    public class PasteboardAction : NSObject, Action
  • Airship permissions manager.

    Airship will provide the default handling for Permission.postNotifications. All other permissions will need to be configured by the app by providing a PermissionDelegate for the given permissions.

    See more

    Declaration

    Swift

    @objc(UAPermissionsManager)
    public class PermissionsManager : NSObject
  • 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…

    Accepted situations: autmoation, manualInvocation, webViewInvocation, launchedFromPush, foregroundInteractiveButton, foreground Push

    Declaration

    Swift

    @objc(UAPromptPermissionAction)
    public class PromptPermissionAction : NSObject, Action
  • Default predicate for the prompt permission action.

    Declaration

    Swift

    @objc(UAPromptPermissionActionPredicate)
    public class PromptPermissionActionPredicate : NSObject, ActionPredicateProtocol
  • A proximity region defines an identifier, major and minor.

    See more

    Declaration

    Swift

    @objc(UAProximityRegion)
    public class ProximityRegion : NSObject
  • This singleton provides an interface to the functionality provided by the Airship iOS Push API.

    See more

    Declaration

    Swift

    @objc(UAPush)
    public class Push : NSObject, Component, PushProtocol
  • A region event captures information regarding a region event for analytics.

    See more

    Declaration

    Swift

    @objc(UARegionEvent)
    public class RegionEvent : NSObject, Event
  • Removes tags. This Action is registered under the names ^-t and “remove_tags_action”.

    Expected argument values: NSString (single tag), NSArray (single or multiple tags), or NSDictionary (tag groups). 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: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, UASituationManualInvocation and UASituationAutomation

    Default predicate: Rejects foreground pushes with visible display options

    Result value: nil

    Error: nil

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UARemoveTagsAction)
    public class RemoveTagsAction : ModifyTagsAction
  • A RetailEventTemplate represents a custom retail event template for the application.

    See more

    Declaration

    Swift

    @objc(UARetailEventTemplate)
    public class RetailEventTemplate : NSObject
  • Airship config needed for runtime. Generated from UAConfig during takeOff.

    See more

    Declaration

    Swift

    @objc(UARuntimeConfig)
    open class RuntimeConfig : NSObject
  • SMS registration options

    See more

    Declaration

    Swift

    @objc(UASMSRegistrationOptions)
    public class SMSRegistrationOptions : NSObject, Codable
  • Scoped subscription list editor.

    See more

    Declaration

    Swift

    @objc(UAScopedSubscriptionListEditor)
    public class ScopedSubscriptionListEditor : NSObject
  • A SearchEventTemplate represents a custom search event template for the application.

    See more

    Declaration

    Swift

    @objc(SearchEventTemplate)
    public class SearchEventTemplate : NSObject
  • Default predicate for the share action.

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objc(UAShareActionPredicate)
    public class ShareActionPredicate : NSObject, ActionPredicateProtocol
  • Subscribes to/unsubscribes from a subscription list. This Action is registered under the names ^sla and “subscription_list_action”.

    Valid situations: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationBackgroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Default predicate: Rejects foreground pushes with visible display options

    Result value: nil

    Error: nil

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UASubscriptionListAction)
    public class SubscriptionListAction : NSObject, Action
  • Default predicate for subscription list actions.

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objc(UASubscriptionListActionPredicate)
    public class SubscriptionListActionPredicate : NSObject, ActionPredicateProtocol
  • Subscription list editor.

    See more

    Declaration

    Swift

    @objc(UASubscriptionListEditor)
    public class SubscriptionListEditor : NSObject
  • Tag editor.

    See more

    Declaration

    Swift

    @objc(UATagEditor)
    public class TagEditor : NSObject
  • Tag groups editor.

    See more

    Declaration

    Swift

    @objc(UATagGroupsEditor)
    public class TagGroupsEditor : NSObject
  • Default predicate for the tag actions.

    Declaration

    Swift

    @available(tvOS, unavailable)
    @objc(UATagsActionPredicate)
    public class TagsActionPredicate : NSObject, ActionPredicateProtocol
  • The privacy manager allow enabling/disabling features in the SDK. The SDK will not make any network requests or collect data if all features our disabled, with a few exceptions when going from enabled -> disabled. To have the SDK opt-out of all features on startup, set the default enabled features in the Config to an empty option set, or in the airshipconfig.plist file with enabledFeatures = none. If any feature is enabled, the SDK will collect and send the following data:

    • Channel ID
    • Locale
    • TimeZone
    • Platform
    • Opt in state (push and notifications)
    • SDK version
    • Accengage Device ID (Accengage module for migration)
    See more

    Declaration

    Swift

    @objc(UAPrivacyManager)
    public class PrivacyManager : NSObject
  • Default predicate for URL actions.

    Declaration

    Swift

    @objc(UAURLActionPredicate)
    public class URLActionPredicate : NSObject, ActionPredicateProtocol
  • Class for accepting and verifying webview URLs.

    URL allow list entries are written as URL patterns with optional wildcard matching:

     <scheme> := <any char combination, '*' are treated as wildcards>
    
     <host> := '*' | '*.'<any char combination except '/' and '*'> | <any char combination except '/' and '*'>
    
     <path> := <any char combination, '*' are treated as wildcards>
    
     <pattern> := '*' | <scheme>://<host>/<path> | <scheme>://<host> | <scheme>:/<path> | <scheme>:///<path>
    

    A single wildcard will match any URI. Wildcards in the scheme pattern will match any characters, and a single wildcard in the scheme will match any scheme. The wildcard in a host pattern "*.mydomain.com" will match anything within the mydomain.com domain. Wildcards in the path pattern will match any characters, including subdirectories.

    Note that NSURL does not support internationalized domains containing non-ASCII characters. All URL allow list entries for internationalized domains must be in ASCII IDNA format as specified in https://tools.ietf.org/html/rfc3490

    See more

    Declaration

    Swift

    @objc(UAURLAllowList)
    open class URLAllowList : NSObject, URLAllowListProtocol
  • Representations of various device connection types.

    See more

    Declaration

    Swift

    @objc(UAConnectionType)
    public class ConnectionType : NSObject
  • The Utils object provides an interface for utility methods.

    See more

    Declaration

    Swift

    @objc(UAUtils)
    public class Utils : NSObject
  • Version matcher.

    See more

    Declaration

    Swift

    @objc(UAVersionMatcher)
    public class VersionMatcher : NSObject
  • Opens a wallet URL, either in safari or using custom URL schemes. This action is registered under the names ^w and wallet_action.

    Expected argument values: NSString

    Valid situations: UASituationForegroundPush, UASituationLaunchedFromPush UASituationWebViewInvocation, UASituationForegroundInteractiveButton, UASituationManualInvocation, and UASituationAutomation

    Result value: An NSString representation of the input

    Fetch result: UAActionFetchResultNoData

    Declaration

    Swift

    @objc(UAWalletAction)
    public class WalletAction : OpenExternalURLAction