I've already managed to create the voice shortcut with Siri. It opens the app, but I can't direct it to a specific route like a deeplink or at least identify that it was requested through Siri.
func criarAtalho() {
let activity = NSUserActivity(activityType: "com.rnf.heyofficer://startTransmission")
activity.title = "Estou sendo abordado"
activity.userInfo = ["action": "transmission"]
activity.isEligibleForSearch = true
activity.isEligibleForPrediction = true
let shortcut = INShortcut(userActivity: activity)
// Exibe a interface para adicionar o atalho de voz
DispatchQueue.main.async {
if let rootVC = UIApplication.shared.windows.first?.rootViewController {
let vc = INUIAddVoiceShortcutViewController(shortcut: shortcut)
vc.delegate = self
rootVC.present(vc, animated: true, completion: nil)
}
}
}
I am using React Native with Expo but with prebuild. How can I identify that it was called through Siri or get the deeplink to adjust a route?
I have tried several ways as suggested by ias but nothing helps.