I’ve decided to run FastPdfKit Reader on another device because the Siri interface on iPhone covers the whole screen and you cannot feel the real power of the implementation.
The procedure can be replicated for every other app in a couple of hours.
In few words: a proxy server (SiriProxy) intercepts the siri commands sent to Apple (we are in the middle), a plugin add some new commands to the list of accepted ones by Siri, takes the answers and open a tunnel with a chat server. The chat server sends immediately the command to the iOS app that is logged as user. The application listen for messages and if receives something parses the content and react accordingly.
What we did is listed below.
First of all clone the SiriProxy repository on github from plamoni: nothing would be possible without that proxy, many thanks.
Follow all the steps reported in the readme. There are also very detailed videos.
I got an error the first time I tried (issue 26) so you can alternatively follow this method to create the certificates. Thanks dus6.
Start up the proxy and configure the DNS on the iPhone 4S.
Then I’ve followed this tutorial from Cesare Rocchi: many thanks even to him.
Read the whole article to find out how to establish a connection between you computer and the app. Basically you need to create a server with python and start up a chat. My hack was to let the SiriProxy communicate to the application through the chatroom.
I’ve written a ruby plugin for SiriProxy (you can find it here on github). The process is very simple as it starts a telnet connection to the localhost and pass some commands with custom prefix. The iOS app part is very easy, again inspired by the Cesare’s article. I’ve created a listener for commands. Few methods on this gist.
If you are interested in the next days I can be more detailed and help you to explore these new possibilities.
Please file an improvement request on Apple’s radar asking for public Siri API.
In the meantime enjoy FastPdfKit 3.0!
To find out what can be done with FastPdfKit, download the FastPdfKit Reader app from the App Store.
This is our press release for FastPdfKit 3.0.