Contents

activate()

Registers the session and requests that the system start it.

Declaration

func activate() async throws

Mentioned in

Discussion

Returning from this method doesn’t mean the session started. The system calls sessionStarted(_:) after registering the session and after your app enrolls the feature. For more information about feature enrollment, see Accessory features.

This method throws AccessoryTransportSession.Error.unavailable if the feature isn’t available on the device, and the system throws an error if a live session for the same feature already exists.

This method doesn’t throw when the feature isn’t enrolled for the accessory. Check the status with AccessoryWorker/authorizationStatus(for:) before you call this method.

See Also

Managing the session life cycle