Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLVoiceCommand

SDLVoiceCommand Class Reference

Section Contents

Overview

Voice commands available for the user to speak and be recognized by the IVI’s voice recognition engine.

voiceCommands

The strings the user can say to activate this voice command

Objective-C

@property (nonatomic, copy, readonly) NSArray<NSString *> *_Nonnull voiceCommands;

Swift

var voiceCommands: [String] { get }

handler

The handler that will be called when the command is activated

Objective-C

@property (nonatomic, copy, readonly, nullable) SDLVoiceCommandSelectionHandler handler;

Swift

var handler: SDLVoiceCommandSelectionHandler? { get }

-initWithVoiceCommands:handler:

Convenience init

Objective-C

- (nonnull instancetype)
    initWithVoiceCommands:(nonnull NSArray<NSString *> *)voiceCommands
                  handler:(nonnull SDLVoiceCommandSelectionHandler)handler;

Swift

init(voiceCommands: [String], handler: @escaping SDLVoiceCommandSelectionHandler)

Parameters

voiceCommands

The strings the user can say to activate this voice command

handler

The handler that will be called when the command is activated

Return Value

An SDLVoiceCommand object

View on GitHub.com
Previous Section Next Section