A type that wraps your app entity and adds information to make a custom view's content discoverable by Apple Intelligence.
A custom view where your app manages state for the user interface or you use custom drawing
to render the interface. For example, you might use a custom
list or tab implementation and manage selection and other states in the app, or you might use Metal to render the interface.
If either applies to your
app's interface, make content discoverable by Apple Intelligence using `appEntityUIElementProvider` and provide the system
with a list of ``AppEntityUIElements``.
When your app uses a custom view and your app manages its state or you use custom drawing
to render a UI element, you need to implement your own `appEntityUIElementProvider`. This closure provides the system with
`AppEntityUIElement` objects that combine the app entity for your content and additional information with spatial and state information
to help the system understand onscreen content.
For more information, refer to <doc:providing-contextual-cues-to-Apple-Intelligence-and-Siri> and
<doc://com.apple.documentation/documentation/appintents>.
Creates a wrapper object that combines an app entity with additional information to make it discoverable
by Apple Intelligence and Siri.
- Parameters:
- identifier: The identifier of an app entity that describes the content of a UI element.
- bounds: The UI element's bounds in the local coordinate space of the entity provider's associated custom view.
- state: The object that indicates whether the UI element is selected.
- subelements: An array of UI elements that represent a group of UI elements.
get · iOS 18.4+
identifier
TypeScript
get identifier(): EntityIdentifier
Swift declaration
var identifier: EntityIdentifier
The identifier of the app entity that represents the UI element.
set · iOS 18.4+
identifier
TypeScript
set identifier(value: EntityIdentifier)
Swift declaration
var identifier: EntityIdentifier
The identifier of the app entity that represents the UI element.
get · iOS 18.4+
subelements
TypeScript
get subelements(): Array<AppEntityUIElement>
Swift declaration
var subelements: [AppEntityUIElement]
An array of UI elements that represent subelements in the view hierarchy.
This property holds an array of UI elements that represents a UI element's composition.
Each element has no defined coordinate space on its own, but instead uses the coordinate space of the root element. As a result,
the bounds of the list of elements a provider returns have the same coordinate space as the provider's attached view.
set · iOS 18.4+
subelements
TypeScript
set subelements(value: Array<AppEntityUIElement>)
Swift declaration
var subelements: [AppEntityUIElement]
An array of UI elements that represent subelements in the view hierarchy.
This property holds an array of UI elements that represents a UI element's composition.
Each element has no defined coordinate space on its own, but instead uses the coordinate space of the root element. As a result,
the bounds of the list of elements a provider returns have the same coordinate space as the provider's attached view.
get · iOS 18.4+
state
TypeScript
get state(): AppEntityUIElement_State
Swift declaration
var state: AppEntityUIElement.State
The property that indicates if the UI element is selected.
set · iOS 18.4+
state
TypeScript
set state(value: AppEntityUIElement_State)
Swift declaration
var state: AppEntityUIElement.State
The property that indicates if the UI element is selected.
get · iOS 18.4+
bounds
TypeScript
get bounds(): { x: number; y: number; width: number; height: number }
Swift declaration
var bounds: CGRect
The bounds of the content in the view's local coordinate space.
set · iOS 18.4+
bounds
TypeScript
set bounds(value: { x: number; y: number; width: number; height: number })
Swift declaration
var bounds: CGRect
The bounds of the content in the view's local coordinate space.
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.