createTab
The app intent conforms to the schema for creating a browser tab.
Declaration
var createTab: some AssistantSchemas.Intent { get }Mentioned in
Overview
Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the .browser.createTab schema:
@AppIntent(schema: .browser.createTab)
struct CreateTabIntent: AppIntent {
@Parameter
var url: URL?
@Parameter
var isPrivate: Bool
func perform() async throws -> some ReturnsValue<TabEntity> {
return .result(value: TabEntity())
}
}For more information about the .browser app intent domain, see Making browser actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.