createTab
The app intent conforms to the schema for creating a browser tab.
Declaration
var createTab: some AssistantSchemas.Intent { get }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 doc:Making-browser-actions-available-to-siri-and-apple-intelligence. For general information about app intent domains, see doc:Integrating-actions-with-siri-and-apple-intelligence.