I am trying to implement SiriKit in my iOS app. I want to open a different view controller when the app is launched through Siri.
How can I handle this type of operation in my app?
I am trying to implement SiriKit in my iOS app. I want to open a different view controller when the app is launched through Siri.
How can I handle this type of operation in my app?
You can do this, however, first you will have to setup SiriKit in your app, which is a bit of work with a long list of instructions: https://developer.apple.com/library/prerelease/content/documentation/Intents/Conceptual/SiriIntegrationGuide/index.html#//apple_ref/doc/uid/TP40016875-CH11-SW1 .
There's also a sample SiriKit App that Apple has put together called UnicornChat: https://developer.apple.com/library/content/samplecode/UnicornChat/Introduction/Intro.html
Once you have added your SiriKit App Extension and have handled your Intent properly, you will be able to send it to your app using a ResponseCode associated with your Intent. This will open your app, and you can catch that and send it to WhateverViewController by adding the following code to your app delegate: