Contents

LiveAssistanceExtension

The protocol you extend to provide live assistance services.

Declaration

@MainActor protocol LiveAssistanceExtension : AppExtension

Overview

To provide interpreter, captioning, or other services that work with FaceTime calls, create a container app that uses the LiveAssistance APIs, as well as an app extension that conforms to this protocol.

The extension performs most of the work involved in joining an assistance provider to a FaceTime call. When a person on a call chooses your app to provide assistance, the framework launches the extension and calls the prepareAssistanceRequest(_:) method. If your extension determines it has everything it needs — the person is signed in and has provided all needed information — it can retrieve a URL from the framework that the service provider uses to join the call. If the extension needs more information, it can return LiveAssistanceRequest.Response.requiresUserInput(reason:), which launches the container app to perform any remaining setup. When the container app is ready for the request to continue, it calls returnToCall(requestID:), which results in a call to the extension’s resumeRequest(_:) method.

Each invocation of your extension runs in a fresh process context. This means you can’t rely on instance state persisting across calls to prepareAssistanceRequest(_:) and resumeRequest(_:), since the framework may have killed the extension and relaunched it in the interim. Instead, persist cross-invocation state in the keychain or App Group defaults.

If the extension process crashes mid-invocation, the request fails immediately. The framework doesn’t re-invoke the handler in this scenario.

Topics

Handling a new request

Resuming a request

Working with supporting types

See Also

Conversation assistance