Post

Replies

Boosts

Views

Activity

app intents not working with placeholders and without app name
I tried this: struct CarShortcutsProvider: AppShortcutsProvider { @AppShortcutsBuilder static var appShortcuts: [AppShortcut] { AppShortcut( intent: LockCarIntent(), phrases: ["Lock my car with \(.applicationName)", "Lock my \(\.$car) with \(.applicationName)"], shortTitle: LocalizedStringResource("Lock Car"), systemImageName: "lock.fill" ) AppShortcut( intent: UnlockCarIntent(), phrases: ["Unlock my car with \(.applicationName)", "Unlock my \(\.$car) with \(.applicationName)"], shortTitle: LocalizedStringResource("Unlock Car"), systemImageName: "lock.open.fill" ) } } but Siri only understands "unlock my car ", not with the placeholder. Siri asks me then for the car, and it understands it, but not in one sentence. Is there something wrong with my code? Also I tried it without applicationName first, and then it didn't work at all with Siri. Is this a general limitation of app intents? I thought the goal was to reduce friction. If the user has to mention the app name all the time, it adds friction.
0
0
90
1d