AirshipPermissionsManager
@objc(UAPermissionsManager)
public final class AirshipPermissionsManager : NSObject, @unchecked Sendable
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.
-
Sets a permission delegate.
Note
The delegate will be strongly retained.
Declaration
Swift
@objc public func setDelegate( _ delegate: AirshipPermissionDelegate?, permission: AirshipPermission )
Parameters
delegate
The delegate.
permission
The permission.
-
checkPermissionStatus(_:
Asynchronous) Checks a permission status.
Note
If no delegate is set for the given permission this will always return
.notDetermined
.Declaration
Swift
@MainActor public func checkPermissionStatus( _ permission: AirshipPermission ) async -> AirshipPermissionStatus
Parameters
permission
The permission.
completionHandler
The completion handler.
-
requestPermission(_:
Asynchronous) Requests a permission.
Note
If no permission delegate is set for the given permission this will always return
.notDetermined
Declaration
Swift
@objc @MainActor public func requestPermission( _ permission: AirshipPermission ) async -> AirshipPermissionStatus
Parameters
permission
The permission.
-
requestPermission(_:
AsynchronousenableAirshipUsageOnGrant: ) Requests a permission.
Note
If no permission delegate is set for the given permission this will always return
.notDetermined
Declaration
Swift
@objc @MainActor public func requestPermission( _ permission: AirshipPermission, enableAirshipUsageOnGrant: Bool ) async -> AirshipPermissionStatus
Parameters
permission
The permission.
enableAirshipUsageOnGrant
true
to allow any Airship features that need the permission to be enabled as well, e.g., enabling push privacy manager feature and user notifications if.postNotifications
is granted.completionHandler
The completion handler.