hostViewControllerWillDeactivate(_:error:)
Tells the host that the app extension disconnected and is no longer available.
Declaration
@MainActor optional func hostViewControllerWillDeactivate(_ viewController: EXHostViewController, error: (any Error)?)Parameters
- viewController:
The host view controller that initiated the connection.
- error:
An error object indicating why the app extension disconnected, or
nilif the extension exited without issues.
Mentioned in
Discussion
The host view controller calls this method when the app extension exits or when you change the view controller’s configuration property. Use this method to close out the previous connection to the app extension.