EnableFeatureAction
public final class EnableFeatureAction : 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: ActionSituation.launchedFromPush
,
ActionSituation.webViewInvocation
, ActionSituation.manualInvocation
,
ActionSituation.foregroundInteractiveButton
, and ActionSituation.automation
-
Default names - “enable_feature”, “^ef”
Declaration
Swift
public static let defaultNames: [String]
-
Default predicate - rejects foreground pushes with visible display options
Declaration
Swift
public static let defaultPredicate: @Sendable (ActionArguments) -> Bool
-
accepts(arguments:
Asynchronous) Declaration
Swift
public func accepts(arguments: ActionArguments) async -> Bool
-
perform(arguments:
Asynchronous) Declaration
Swift
@MainActor public func perform(arguments: ActionArguments) async throws -> AirshipJSON?