One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.BrowserIntent

protocol · iOS 16.0+ · SDK 27.1

protocol BrowserIntent : AssistantSchemas.Model

Assistant schema conformance for app intents that offer web browsing functionality.

Members (13)

get · iOS 16.0+

findOnPage

Swift declaration
var findOnPage: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for finding text on a web page. ## 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.findOnPage` schema: ```swift @AppIntent(schema: .browser.findOnPage) struct FindOnPageIntent: AppIntent { @Parameter var tab: TabEntity @Parameter var searchPhrase: String func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

bookmarkTab

Swift declaration
var bookmarkTab: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for creating a new bookmark for a browser tab. ## 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.bookmarkTab` schema: ```swift @AppIntent(schema: .browser.bookmarkTab) struct BookmarkTabIntent: AppIntent { @Parameter var name: String? @Parameter var tab: TabEntity func perform() async throws -> some ReturnsValue<BookmarkEntity> { .result(value: BookmarkEntity()) } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

bookmarkURL

Swift declaration
var bookmarkURL: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for creating a bookmark for a URL. ## 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.bookmarkURL` schema: ```swift @AppIntent(schema: .browser.bookmarkURL) struct BookmarkURLIntent: AppIntent { @Parameter var name: String? @Parameter var url: URL func perform() async throws -> some ReturnsValue<BookmarkEntity> { .result(value: BookmarkEntity()) } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

clearHistory

Swift declaration
var clearHistory: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for clearing the browser history. ## 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.clearHistory` schema: ```swift @AppIntent(schema: .browser.clearHistory) struct ClearHistoryIntent: AppIntent { @Parameter var timeFrame: ClearHistoryTimeFrame func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

closeWindows

Swift declaration
var closeWindows: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for closing one or more browser windows. ## 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.closeWindows` schema: ```swift @AppIntent(schema: .browser.closeWindows) struct CloseWindowsIntent: AppIntent { @Parameter var target: [WindowEntity] func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

createWindow

Swift declaration
var createWindow: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for creating a new browser window. ## 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.createWindow` schema: ```swift @AppIntent(schema: .browser.createWindow) struct CreateWindowIntent: AppIntent { @Parameter var url: URL? @Parameter var isPrivate: Bool func perform() async throws -> some ReturnsValue<WindowEntity> { .result(value: WindowEntity()) } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

openBookmark

Swift declaration
var openBookmark: some AssistantSchemas.Intent { get }

The app intent conforms to the Assistant schema for opening a bookmarked URL. ## 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.openBookmark` schema: ```swift @AppIntent(schema: .browser.openBookmark) struct OpenBookmarkIntent: OpenIntent { @Parameter var tab: TabEntity? @Parameter var target: BookmarkEntity func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

openURLInTab

Swift declaration
var openURLInTab: some AssistantSchemas.Intent { get }

The app intent conforms to the Assistant schema for loading a URL in a browser tab. ## 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.openURLInTab` schema: ```swift @AppIntent(schema: .browser.openURLInTab) struct LoadURLInTabIntent: AppIntent { @Parameter var tab: TabEntity @Parameter var url: URL func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

deleteBookmarks

Swift declaration
var deleteBookmarks: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for deleting a bookmark. ## 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.deleteBookmarks` schema: ```swift @AppIntent(schema: .browser.deleteBookmarks) struct DeleteBookmarksIntent: DeleteIntent { @Parameter var entities: [BookmarkEntity] func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

search

Swift declaration
var search: some AssistantSchemas.Intent { get }

The app intent conforms to the Assistant schema for performing a web search. ## 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.search` schema: ```swift @AppIntent(schema: .browser.search) struct SearchWebIntent: ShowInAppSearchResultsIntent { static var searchScopes: [StringSearchScope] = [.general] @Parameter var criteria: StringSearchCriteria func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

closeTabs

Swift declaration
var closeTabs: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for closing a browser tab. ## 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.closeTabs` schema: ```swift @AppIntent(schema: .browser.closeTabs) struct CloseTabsIntent: AppIntent { @Parameter var target: [TabEntity] func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

createTab

Swift declaration
var createTab: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for creating a browser tab. ## 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: ```swift @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:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

switchTab

Swift declaration
var switchTab: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for switching to a specific tab. ## 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.switchTab` schema: ```swift @AppIntent(schema: .browser.switchTab) struct SwitchToTabIntent: OpenTab { @Parameter var target: TabEntity func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →