ComputedProperty(title:description:authenticationPolicy:visibility:indexingKey:)
A macro that adds a computed app entity property with a get accessor and an optional set accessor.
Declaration
@attached(peer, names: prefixed(`$`), prefixed(`_`)) @attached(accessor, names: named(get), named(set)) macro ComputedProperty(title: LocalizedStringResource? = nil, description: LocalizedStringResource? = nil, authenticationPolicy: IntentAuthenticationPolicy? = nil, visibility: IntentVisibility? = nil, indexingKey: PartialKeyPath<CSSearchableItemAttributeSet>)Parameters
- title:
A localized string resource describing the property for display in the user interface.
- description:
Additional details about this property.
- authenticationPolicy:
The authentication policy to enforce when the system accesses this property, or
nilto use the entity’s policy. - visibility:
Whether the property is available to system features, or only to your app, or
nilfor.default. - indexingKey:
A Spotlight attribute set key mapping for this property.
See Also
Entity support
GenerableEntityAppEntity(_:)AppEntity(_:schema:)ComputedProperty(title:description:authenticationPolicy:visibility:)ComputedProperty(title:description:authenticationPolicy:visibility:customIndexingKey:)DeferredProperty(title:description:authenticationPolicy:visibility:)DeferredProperty(title:description:authenticationPolicy:visibility:indexingKey:)AppEntityTraits