Contents

init(title:description:defaultValue:defaultUnit:defaultUnitAdjustForLocale:supportsNegativeNumbers:requestValueDialog:inputConnectionBehavior:)

Creates an app intent parameter with a default unit for the measurement.

Declaration

convenience init(title: LocalizedStringResource, description: LocalizedStringResource? = nil, defaultValue: Double? = nil, defaultUnit: IntentParameter<Value>.Dispersion? = nil, defaultUnitAdjustForLocale: Bool = false, supportsNegativeNumbers: Bool = true, requestValueDialog: IntentDialog? = nil, inputConnectionBehavior: InputConnectionBehavior = .default)

Parameters

  • title:

    A word or short phrase summarizing this parameter.

  • description:

    Additional details about this parameter.

  • defaultValue:

    The default value for this parameter. People can specify a different value.

  • defaultUnit:

    The default unit that should be selected when this parameter is initially created.

  • defaultUnitAdjustForLocale:

    Whether or not the default unit should adjust to match someone’s locale. Default value is false.

  • supportsNegativeNumbers:

    Whether or not this parameter supports negative number inputs. Default value is true.

  • requestValueDialog:

    A prompt that asks a person to provide the parameter value.

  • inputConnectionBehavior:

    An enum that indicates how this parameter receives the output from a preceding app intent.

See Also

Creating an intent parameter