Can I use Siri kit to request information from my server? - ios

I want to use Siri to show some data, it it was invoked.
For example if I was developing a news app.
Could I have it such that, if the user asks Siri 'what's the headlines from 'myapp''
It returns the top most headline according to my app

Actually You can't do thar with SiriKit (Intents.framework). The domains allowed are listed below (read more at Siri Programming Guide)...
VoIP calling
Messaging
Payments
Photo
Workouts
Ride booking
CarPlay (automotive vendors only)
Restaurant reservations (requires additional support from Apple)
Maybe what You are looking for is in the Speech Framework.

Related

Save a contact on iOS using QR [duplicate]

Is there a URL to open the contacts application from within my application? I know you can achieve this with the settings app by using the UIApplicationOpenSettingsURLString constant in Swift; however, I wasn't sure if I could do the same with the Contacts app.
There isn't a deep link for opening the Contacts App.
Apple is very picky when it comes to deep-linking. They have to provide one for Settings since many apps need services like Data, Location, Bluetooth, Wifi, etc.
Unfortunately they do not extend this to the Contacts App.
However if your app needs contact information then for that Apple has provided a Contacts framework to browse through your contacts within your app itself.
Read more about it here.
In order to add/update/delete/merge contacts directly from your app without using the Apple's Contact UI, use the CNSaveRequest APIs. More on that here.
The closest thing you can get to opening a contact is to write them a message in IMessage. From this screen the user can press the contact icon and open the contact page for that particular contact.
You can do this by opening the url sms://+44776382223 where the number is the number of the person that you would like to view the contact of.

React Native Tap and Pay - NFC

I'm writing a React Native app and I need to incorporate the Apple Pay tap-and-go nfc functionality.
I've been researching and I've only been able to see examples or documentation regarding the 'in-app-purchase' type of payment prompts (the classic pop up that appears every time you make a purchase in an app).
I have seen
tipsi-stripe, react-native-tap-payment, react-native-nfc-manager
but they don't seem to do what I would expect.
What I'm looking for is a way to trigger the NFC functionality that you use in shops when you tap and pay with your phone instead of with the card in your wallet (see https://support.apple.com/en-us/HT201239#stores).
Any suggestions on a good library that allows me to achieve that?

How to integrate Siri with an iOS app to allow voice search

How can I integrate Siri with a custom iOS app to allow users to search for keywords using their voices? For example the user speaks a keyword and activate the app to search for the result. Or searching specific information with a sentence.
There are basically two main ways to interact with SiriKit:
NSUserActivity, a basic action in your app.
INIntent, allows you to interact with Siri.
You have to choose which one fits you purpose. If you need user input (like a search term) from Siri you probably want to use an INIntent (available in iOS 13+) which then completes with a userActivity with the data you need. That should call the application:continueUserActivity:restorationHandler function in your AppDelegate.
The user can choose to add those features to his SiriShortcuts app himself. You can add a INUIAddVoiceShortcutButton in your app to get the users attention to that feature.

Limits of SiriKit?

I'm thinking a lot about how Siri could improve the UX of my App.
I'm coding an app dedicated to fitness, to log your workouts and your personal records.
I would like to let the user use Siri to use features of my App, but I don't really understand if it's possible or not. I read the documentation but it's not very clear for me, I don't know if Siri is limited to "start / stop / pause / resume a workout" or if we can do more.
( https://developer.apple.com/documentation/sirikit/workouts )
I would like to add things like that:
"Hey Siri, what's my personal record for deadlift?"
"Hey Siri, log 230 reps for my workout of the day"
"Hey Siri, what is the workout of the day?"
Could you tell me if it's possible to do that? Is it possible to connect Siri with your app and your database / functions?
The possible actions that Siri can initiate (the "intents") are pre-defined by Apple. From https://developer.apple.com/documentation/sirikit:
SiriKit defines the types of requests—known as intents—that users can
make. Related intents are grouped into domains to make it clear which
intents you might support in your app. For example, the messages
domain has intents for sending messages, searching for messages, and
marking messages as read or unread.

iOS - allow specific contact to call in silent mode

I am working in project that allow user choose some contact to call even phone in silent mode .
is this available
There is no API supplied by Apple that will allow you to do this. Your is is sandboxed and can not interacte fully with others apps.
When people switch their iPhone to silence mode, only those who have been added to favorite list can call successufully.
The problem is that favorite list is belong to Phone app, it's inside the app's sandbox, private API used by Apple. Developer should not use these kind of API, we can only use public API

Resources