Initializer

init(radioType:frequency:stationName:channel:presetNumber:)

Initializes the intent object with the specified climate settings information.

Declaration

@nonobjc convenience init(radioType: INRadioType = .unknown, frequency: Double? = nil, stationName: String? = nil, channel: String? = nil, presetNumber: Int? = nil)

Parameters

radioType

The type of tuner that applies to the radio station.

frequency

The broadcast frequency of the radio station. Specify the frequency as a floating-point number.

stationName

The name of the radio station.

channel

The channel number assigned to the station. The value in this property is typically used to specify satellite channel numbers but may represent any designation for a radio channel. If you specify a value for the presetNumber parameter, do not specify a value for this parameter.

presetNumber

The radio preset to use. Specify an integer that corresponds to a programmable preset slot. If you specify a value for the channelNumber parameter, do not specify a value for this parameter.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user asks to change the radio station. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.