INUIHostedViewControlling

INUIHostedViewControlling

INUIHostedViewControlling Protocol of IntentsUI Methods for presenting custom content in the Siri and Maps interfaces.

@MainActor protocol INUIHostedViewControlling : NSObjectProtocol

Overview

The INUIHostedViewControlling protocol defines methods for presenting a custom interface from Siri or Maps. You adopt this protocol in a view controller, which you then deliver in an Intents UI app extension as part of your iOS app. When displaying information to the user, Siri and Maps incorporate your view controller’s content into the default interface. In iOS 11 and later, SiriKit gives you the option to replace some or all of the default interface.

An Intents UI app extension works in tandem with a corresponding Intents app extension. The Intents app extension handles the intent and provides a response that includes data from your app. The view controller in your Intents UI app extension receives that data in the form of an INInteraction object and uses it to configure its view. Using the methods of this protocol, you can replace some or all of the default Siri or Maps interface or you can augment the default interface with a custom view.

Each Intents UI app extension must contain only one view controller, but that view controller may provide a custom interface for multiple intents. Use the IntentsSupported key in the extension’s Info.plist file to specify which intent classes the view controller supports. During the configuration phase, use the class of the intent to configure the contents of your view.

For more information on how to create an Intents UI extension, see //com.apple.sirikit/documentation/SiriKit/creating an intents ui extension.