Andrew Ebling
Andrew Ebling

Reputation: 10283

How to allow users to search within an iOS app via Siri

We have an app (let's call it MyOracle) which contains a lot of useful information for corporate users.

Users would like to search for information in the app like this:

"Hey Siri - search MyOracle for articles on climate change"

Looking at SiriKit, which appears to only offer a handful of very specific/not very useful intents, it appears this is not possible.

Or is there another approach, using the global search API or speech recognition API?

Upvotes: 2

Views: 715

Answers (1)

Sandeep Khade
Sandeep Khade

Reputation: 2833

You have to do it with shortcuts and custom intents, you can find it with iOS 12 new siri Apple Doc

With this it's very easy to add our phrases and custom intents with it's handling to the application and siri will get it for us.

if let shortcut = INShortcut(intent: order.intent) { let addVoiceShortcutVC = INUIAddVoiceShortcutViewController(shortcut: shortcut) addVoiceShortcutVC.delegate = self present(addVoiceShortcutVC, animated: true, completion: nil) }

This worked for me.

Upvotes: 3

Related Questions