Contents

init(question:permissionFlow:onPermissionResult:label:)

Creates a button that requests permission from parents or guardians, presenting a specific permission flow and reporting the outcome to a completion handler.

Declaration

@MainActor @preconcurrency init(question: PermissionQuestion<Topic>, permissionFlow: PermissionFlow, onPermissionResult: @escaping (Result<PermissionResult, any Error>) -> Void, @ViewBuilder label: @escaping () -> Label) where Topic == SignificantAppUpdateTopic

Parameters

  • question:

    The question to ask a parent or guardian on behalf of their child.

  • permissionFlow:

    The permission flow to present.

  • onPermissionResult:

    A closure that’s called with the result of the permission flow. The button is disabled while a flow is presented, so the closure is invoked once per completed interaction.

  • label:

    The view to display inside the button.