A parameter of an interaction object.


class INParameter : NSObject


Use a parameter object to identify a property of an INInteraction object. To fetch the value of the property, use the parameterValue(for:) method of the INInteraction object.

You use parameters when configuring a custom user interface for your Siri or Maps interactions. SiriKit passes parameter objects to you during the configuration of your interface. When configuring your interface, you can also create parameter objects to represent properties that you display in addition to the ones that SiriKit provides.


Creating a Parameter Object

init(for: AnyClass, keyPath: String)

Creates a new parameter object using the specified key path and class information.

init?<Root, Value>(keyPath: KeyPath<Root, Value>)

Creates a new parameter object using the specified key path and class information.

Getting the Parameter Details

var parameterKeyPath: String

The key path to a property of an interaction object.

var parameterClass: AnyClass

The type of object represented by this parameter.

Managing Indexed Values

func index(forSubKeyPath: String) -> Int

The index into the array at the specified portion of the key path.

func setIndex(Int, forSubKeyPath: String)

Specifies which item of an array or ordered set to use for the parameter.

Comparing Parameters

func isEqual(to: INParameter) -> Bool

Returns a Boolean value indicating whether the specified parameter object represents the same property as the current parameter object.


Inherits From

See Also

Custom UI

protocol INUIHostedViewControlling

Methods for presenting custom content in the Siri and Maps interfaces.

protocol INUIHostedViewSiriProviding

Methods for hiding portions of the default interfaces that Siri provides.