Swift Siri simple Q&A - swift

I would like to have a quite simple Siri extension where I ask something and Siri just answers for Example:
I say:
Hey Siri what do you like in my App?
Siri answers:
I love the Siri integration!
At the Apple website I just found things like payment or messaging apps but no simple Q&A...
Could you give me a sample or an good Hint, where I can find something like I want?
Thank you for your answers!

This is possible with Intents Extension. From your app you add a new Intents Extension and there you create an intent response. In the response you can set whatever you want siri to answer when that intent is being triggered. Check the Soup Chef tutorial from the last WWDC if you want to learn more about it.
For convenience, here is that tutorial: https://developer.apple.com/documentation/sirikit/soup_chef_accelerating_app_interactions_with_shortcuts

You can't ask Siri whatever you want and set what answer you want to get back. Check out the Intent Domains from: https://developer.apple.com/documentation/sirikit and see that there a predefined categories that it can handle.

Related

How to make Siri perform a specific action in my App?

I want to integrate Siri in my app and make it perform specific actions i.e:
1- open specific view
2- send feedback
I searched about this functionality, but no useful answers were found.
anyone have tried use Siri like this way?
Thanks.
Siri right now only works for certain 'domains' (see https://developer.apple.com/sirikit/).
If you app is in one of these domains you can trigger certain app functions through Siri. Depending on what kind of app you are working on you could theoretically use the Messaging domain to let users send you feedback.
You won't be able to use Siri to navigate through your app by voice but you might be able to trigger certain features.

Send normal Siri commands through coding

I am completely new to this but here goes anyway. I've been reading that Siri has no access via API. My question might be a tad different.
What I would Like to do is send Siri this message
What is the weather like today
That's it, nothing new. I'm not trying to make Siri do something it doesn't already do. I'm just trying to send that message in my own code rather than hitting the button and saying it.
Any thoughts???
Thanks !!!
No you cannot do that. Apple has not yet provided any public APIs to developers for Siri programming. Also the link that you provide in one of your comments, it is for jailbroken devices. They must have used the private APIs.

Google Maps and Siri implementation

Just wondering, can we integrate Google Maps and Siri together. For Example:
I ask Siri, "show nearest Starbucks" and Siri will open the Map app or Google Maps and show the nearest Starbucks on the map.
Or
I ask Siri, "show me all Apple Stores". Siri will open the map and show all the locations of Apple Stores on the map.
Is this doable?
I havn't found any good tutorial,documentation to study more about Siri implementation, apart from articles only. There is no technical documentation/API available?
This isn't directly supported right now, without writing a third party website that Siri can hook into. According to the below linked documentation, from Apple's website, Siri on iOS 6 will support this functionality in at least limited part:
http://www.apple.com/ios/ios6/siri/
Eyes Free
Apple is working with car manufacturers to integrate Siri into select voice control systems. Through the voice command button on your steering wheel, you’ll be able to ask Siri questions without taking your eyes off the road. To minimize distractions even more, your iOS device’s screen won’t light up. With the Eyes Free feature, ask Siri to call people, select and play music, hear and compose text messages, use Maps and get directions, read your notifications, find calendar information, add reminders, and more. It’s just another way Siri helps you get things done, even when you’re behind the wheel.
This encourages me to believe that they will also expose the API (because someone will ferret it out if it exists) to normal API consumers during the iOS 6 lifecycle, probably before iOS 6.1, or with that release.
It is not currently possible through any kind of API that Apple use. However, there are some third party APIs that you could use such as: https://www.ispeech.org/developers/iphone You'd have to use that and then pass on the returned data to the Google Maps API.
Although this approach won't be as intuitive as using Siri, since that is not currently possible, this is the best bet you have for the mean time.
Unfortunately, Apple has not opened Siri's API to developers yet making this task impossible. However, Apple will probably open it soon. If you just want to use it for personal use, check out SiriProxy (https://github.com/plamoni/SiriProxy). SiriProxy lets you do exactly what you asked; however, for it to work, you must be on your wifi network so it cannot be in one of your app. Good Luck!

Best way to implement "user to user" VoIP on iOS

I have seen some great libraries to implement VoIP on iOS but they all apply for making calls to actual numbers. All I need is communication between users of my app. Siphon seems like a great option but you have to configure it with a service which allows you to make calls. All I need is communication between my users, maybe there is a better way to do this.
Any advice is appreciated!
It's not entirely clear what you're asking, but,
all of what you describe is built in to Game Kit which is part of iOS.
You can use "Game Kit" for any sort of networking. (It does not have to be a game.) And person-to-person voice chat is completely built in. It's two or three lines of code.
Hope it helps!

change ringer in iPhone via code

I couldn't find it in the documentation, so I'd ask: is there a way to get/set the ringtone for a specific user in the address book (programatically, of course)?
No, there isn't an official API to do that. Submiting a feature request is all you can do.