PromptPermissionAction
public final class PromptPermissionAction : 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: ActionSituation.foregroundPush, ActionSituation.launchedFromPush,
ActionSituation.webViewInvocation, ActionSituation.manualInvocation,
ActionSituation.foregroundInteractiveButton, and ActionSituation.automation
-
Default names - “prompt_permission_action”, “^pp”
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
public func perform(arguments: ActionArguments) async throws -> AirshipJSON?
View on GitHub