One Logo Pool Ball
AppIntents · IOS API REFERENCE

OpenURLIntent

struct · iOS 18.0+ · SDK 27.1

struct OpenURLIntent

An app intent that opens one of your universal links and displays its contents. This app intent uses your app’s existing universal link support to open the specified URL. Universal links are a stable and consistent way to refer to the same content in your app or website. Apps that support universal links can return this type as the result of another app intent’s ``AppIntent/perform()`` method to display specific content. You can also place the app intent on a button in an interactive widget or Live Activity. When the app intent runs, the system sends the URL to your app’s URL handling code so you can open the referenced content. The system automatically brings your app to the foreground to run an app intent of this type. If your app intent adopts the ``TargetContentProvidingIntent`` or ``UISceneAppIntent`` protocol, the system directs the app intent to one of your app’s scenes first so you can configure the scene’s views. If your app intent type doesn’t support these protocols, use the ``AppIntent/perform()`` method to update your app’s interface. For information about how to adopt universal links in your app, see <doc://com.apple.documentation/documentation/Xcode/allowing-apps-and-websites-to-link-to-your-content>.

Members (7)

get · iOS 18.0+

url

TypeScript
get url(): string
Swift declaration
@IntentParameter<URL> var url: URL { get nonmutating set }

The universal link you use to locate your app’s content.

set · iOS 18.0+

url

TypeScript
set url(value: string)
Swift declaration
@IntentParameter<URL> var url: URL { get nonmutating set }

The universal link you use to locate your app’s content.

get · iOS 18.0+

$url

TypeScript
get $url(): IntentParameter<string>
Swift declaration
var $url: IntentParameter<URL> { get }
get · iOS 18.0+

title

TypeScript
static get title(): _Foundation_LocalizedStringResource
Swift declaration
static var title: LocalizedStringResource

A short, localized, human-readable string that conveys the app intent’s action. Specify title strings using a verb followed by a noun in title case. For example, an action to open an album might have the title “Open Album”. If the app intent conforms to a schema, the schema provides this value.

set · iOS 18.0+

title

TypeScript
static set title(value: _Foundation_LocalizedStringResource)
Swift declaration
static var title: LocalizedStringResource

A short, localized, human-readable string that conveys the app intent’s action. Specify title strings using a verb followed by a noun in title case. For example, an action to open an album might have the title “Open Album”. If the app intent conforms to a schema, the schema provides this value.

init · iOS 18.0+

init

TypeScript
static init(): OpenURLIntent
Swift declaration
init()

Creates and returns the app intent.

init · iOS 18.0+

init

TypeScript
static init42381(url: string): OpenURLIntent
Swift declaration
init(_ url: URL)

Configures the app intent with the provided URL. - Parameters: - url: A universal link to your app’s content.

Skipped declarations

3 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

OpenURLIntent.urlRepresentation

This declaration needs Swift generic type arguments. (no canonical witness for Self)

OpenURLIntent.init(urlRepresentable:)

This parameter hides a concrete Swift type.

OpenURLIntent.init(urlRepresentable:)

This parameter hides a concrete Swift type.

All AppIntents types →