Contents

AppExtension

An interface you use to declare the content, structure, and behavior of an app extension.

Declaration

protocol AppExtension

Mentioned in

Overview

This type provides the entry point for an app extension, and every app extension must have a concrete type that adopts it. When a host app launches an app extension, the system looks for an object that adopts this protocol. The protocol provides default implementations of the code required to run the app extension.

When adopting this protocol, implement the configuration property and provide a type capable of establishing an XPC connection to the host app. If your app extension sends only data to the host app, and doesn’t provide a UI, provide a type that implements the AppExtensionConfiguration protocol. If your extension provides UI elements for the host app to display, instead provide an instance of the AppExtensionSceneConfiguration type.

Topics

Creating an app extension

Configuring the app extension

Running the main event loop

Instance Properties

Type Aliases

Default Implementations

See Also

App-extension setup