Instance Property


The template that the Siri watch face uses to display the relevant shortcut.


@property(copy, nonatomic) INDefaultCardTemplate *watchTemplate;


Provide a template when you want to customize the appearance of the relevant shortcut card displayed on the Siri watch face.

Listing 1

Set the watch template for a relevant shortcut in the Soup Chef sample app

let suggestedShortcut = INRelevantShortcut(shortcut: shortcut)

let localizedTitle = NSString.deferredLocalizedIntentsString(with: "ORDER_LUNCH_TITLE") as String
let template = INDefaultCardTemplate(title: localizedTitle)
// Need a different string for the subtitle because of capitalization difference.
template.subtitle = NSString.deferredLocalizedIntentsString(with: menuItem.shortcutNameKey + "_SUBTITLE") as String
template.image = INImage(named: menuItem.iconImageName)

suggestedShortcut.watchTemplate = template