A template that displays a voice control indicator on the CarPlay screen.


class CPVoiceControlTemplate : CPTemplate


CarPlay navigation apps must show a voice control indicator during audio input by presenting a voice control template. When creating the template, provide one or more CPVoiceControlState objects. To switch between states, call the activateVoiceControlState(withIdentifier:) method.


Creating a Voice Control Template

init(voiceControlStates: [CPVoiceControlState])

Creates a voice control template with a list of voice control states.

class CPVoiceControlState

A voice control state containing title variants and images for use by a voice control template.

Activating a State

func activateVoiceControlState(withIdentifier: String)

Changes the template’s state to the one matching the specified identifier.

var activeStateIdentifier: String?

The identifier of the template’s current voice control state.

Getting Available States

var voiceControlStates: [CPVoiceControlState]

The array of voice control states available to the template.


Inherits From

Conforms To