prepareAssistanceRequest(_:)
Prepares to handle a fresh assistance request, in response to a call from the framework.
Declaration
@MainActor func prepareAssistanceRequest(_ request: LiveAssistanceRequest) async throws -> LiveAssistanceRequest.ResponseDiscussion
Implement this method by performing any necessarily setup and eligibility checks. When finished, do one of the following:
If the request can proceed, forward
request.urlto your backend, and return LiveAssistanceRequest.Response.proceed. In this scenario, this is the only method your extension handles, because the framework doesn’t need to call resumeRequest(_:).If the request requires logging in or other interaction from the person using the app, return LiveAssistanceRequest.Response.requiresUserInput(reason:) to transfer control to your container app.
If the request can’t proceed, throw a LiveAssistanceRequestError to end the request.