StructureScopedPermissionsController

struct StructureScopedPermissionsController
extension StructureScopedPermissionsController : Sendable

A controller for managing structure scoped permissions.

  • A feature that can be consented to via the permissions controller.

    Declaration

    Swift

    enum Feature
    extension StructureScopedPermissionsController.Feature : Equatable, Hashable, Sendable
  • The status of the consent.

    Declaration

    Swift

    enum ConsentStatus
    extension StructureScopedPermissionsController.ConsentStatus : Equatable, Hashable, Sendable
  • The response from the consent request.

    Declaration

    Swift

    enum ConsentResponse
  • Undocumented

    Declaration

    Swift

    func consentedFeatures() async -> Set<StructureScopedPermissionsController.Feature>
  • Gets the consent status for the given features.

    Declaration

    Swift

    func getFeatureConsentState(features: [StructureScopedPermissionsController.Feature]) async -> [StructureScopedPermissionsController.Feature : StructureScopedPermissionsController.ConsentStatus]

    Parameters

    features

    The features to get the consent status for.

    Return Value

    A map of feature to consent status.

  • Presents a view for users to consent to the given features.

    Declaration

    Swift

    func requestConsent(for features: [StructureScopedPermissionsController.Feature]) async -> StructureScopedPermissionsController.ConsentResponse?

    Return Value

    The response from the consent request. Returns nil if the user has already consented to the features or an error occurred.