Generic Class

INIntentResolutionResult

A resolution result for a parameter of an intent object.

Overview

An INIntentResolutionResult object describes how your app resolves a parameter of an intent object. This class is abstract and you do not create instances of it directly. Instead, you use class methods to instantiate the appropriate subclass whose type matches the type of data that you are trying to resolve. This class defines methods that are common to all resolution result objects.

During the resolution phase of a request, each parameter you resolve requires a resolution result object of a specific type. When creating that resolution result object, use the class method that represents your resolution. Subclasses of INIntentResolutionResult define methods for returning a successful resolution and may contain other methods for confirming values or disambiguating from among several possible values. Use the methods of this class when a value is not required, when a required value is missing, or when the value specified by the user does not correspond to a supported solution.

When creating resolution result objects, always strive toward successful resolutions. If needed, take advantage of information you have regarding the user’s behavior patterns or interactions with your app. For example, if the user always has the same workout goals, use the previous workout goals as default values rather than asking the user to specify goal information.

Topics

Common Results

class func needsValue() -> Self

Creates an object whose resolution indicates that a required parameter value is missing.

class func notRequired() -> Self

Creates an object whose resolution indicates that you do not need the value of the parameter.

class func unsupported() -> Self

Creates an object whose resolution indicates that your app does not support the specified value.

Relationships

Generic Constraints

  • ObjectType : AnyObject
    

Inherits From

Conforms To