SiriKit Integration 2023?

I would love to be able add Siri commands to my app/ have my app deliver results directly to Siri/ have it read it out. What’s the best way to get this done?

I know Apple just made major changes to the SiriKit Intents, but I’m not sure how to use them. I’m following this guide, but it’s kind of confusing: Soup Chef: Accelerating App Interactions with Shortcuts | Apple Developer Documentation

I came across this too, but it’s complicated to me: Creating an Intents UI Extension | Apple Developer Documentation

@Dougster asked this too last year, and didn’t get any answer :pensive: the Apple docs are tough, so would appreciate any expert help on this!!

Could we please get some help @Chris_Parker @Chris_Chin @xpher0408 @roosterboy @mikaelacaron ?

Sorry mate. I have no idea about SiriKit.

1 Like

@RedFox1 Please don’t specifically tag anyone. It discourages others from answering.

What parts specifically are you confused about in the article?

Hey @mikaelacaron thanks for the response (also thanks @Chris_Parker for your reply) appreciate your guys’ expertise!

Mikaela, I’m a little confused how tagging someone discourages engagement… can you please explain more?

@Dougster asked this very same question in the fall 2022, and received no response. I asked the same question 30 days ago, and received a whopping, drumroll please zero responses. It’s only because I tagged individuals that we’re having this conversation :slight_smile:

I don’t get how to use the latest/ greatest techniques to enable an app to use Siri. I see it working in the Soupkit app (kinda), but not really elsewhere. Can you please direct me to some good video tutorials of its implementation?

Like many others that pay for CWC+, we do so, because we find Apple’s docs, so cryptic. Meanwhile, your team’s videos make them accessible for us. love the site! Would love to see some videos by Stewart Lynch or Chris on how to use Siri as well :crossed_fingers:t2:

There does not seem to be many tutorials around. Searching google with “sirikit integration examples” threw up this list:

SiriKit Tutorial for iOS | Kodeco - from 2017 using Xcode 8 ???
https://rubygarage.org/blog/ios-12-sirikit-tutorial - from 2019 using iOS 12 ???
How to Integrate Siri Shortcuts and Design Custom Intents [Tutorial] | by Ami Intwala | Simform Engineering | Medium - Not sure if this will be helpful

Like I said, doesn’t seem to be a lot around.

1 Like

It shows you may be looking answers from specific individuals, which can discourage others from answering your question.

Generally if you ask a question and don’t get a response, and then comment back “hey still looking for answering on this, I’ve tried XYZ, but am having trouble with JFK”
That can help show your post again, and shows you’ve tried and what you’re having issues with. This forum is sorted by last post, so sometimes posts can get buried.

You can request a SiriKit tutorial here!

Have you gone through the tutorials you linked? Do you have an issue on a specific step, not understanding what it’s asking, or what something means? (We can try to guide you, but I also haven’t used SiriKit)

Hey I didn’t view it like that before, but now I see what you mean. Thanks :slight_smile:

I’ll give it a shot in the future! Thanks :slight_smile:

In my case, I haven’t gotten the SoupKit app by Apple to work with Siri. It just doesn’t activate Siri. However, it turned out it was disabled for free dev users, so after purchasing a dev account it should work for me… and then like with all code, it breaks, so I haven’t had time to fix the issues with my previously running SoupKit tutorial.

@CalStark sent me this short YouTube video on it: https://www.youtube.com/watch?v=WP3QlrBQC80 - which seems simple enough, and Raphael also shared the source code to the YouTuber’s repo: AppIntentBasic/BasicAppIntentGIT/CounterAppIntent/CounterAppIntentApp.swift at main · bobh/AppIntentBasic · GitHub. I tried the code, but Siri still doesn’t activate as shown with the commands in the video.

1 Like

Yeah I would definitely first make sure you can run their sample projects. Because this gives you a baseline for working code.

And then compare all the settings described in their tutorial and check you have the right things configured

1 Like

Hey Andrew, so I tried implementing the tutorial I recommended, and indeed, at first it would not work.

But now it does work!

Some stuff I learnt along the way:

  1. The Apple documentation is not perfect, don’t always trust it. For example, at 7:23 of this video, the code does not compile → Dive into App Intents - WWDC22 - Videos - Apple Developer
  2. The tutorial I sent you successfully creates the Shortcuts in the user’s phone without any user interaction (you can check your phone’s “Shortcuts App” after installing your prototype). The tricky part is to activate the Shortcut with a voice command to Siri. I found many people struggling with this as well → App Intent not Discoverable by Siri | Apple Developer Forums
  3. According to Apple, for the Siri voice command to get triggered, it’s important for Siri to identify your app (hence the “.applicationName” here). See this video at 3:37 → Implement App Shortcuts with App Intents - WWDC22 - Videos - Apple Developer
 AppShortcut(
            intent: SiriAddOne(),
            phrases: ["Add one to \(.applicationName)"]
        )
  1. I made sure Siri knew the name of my app (which I called “MyCounter”). I set this in the info.plist of the app. Found the info here →
    Specifying Synonyms for Your App Name | Apple Developer Documentation
    and here → Technical Q&A QA1950: Hey Siri, How Can I Improve the Recognition of My App's Name?
  2. According to the people complaining in the link in my bullet point n°(2), once you build and install the app on your phone, it can take a while for Siri to learn your app’s name. (Some people say a few hours, others say 10min - but the point is it takes a while).

Anyway. After all this, for me it works. When I say: “Hey Siri, add one to my counter”, the shortcut gets triggered, the app opens, and my counter increments.

I wonder what could be built with this power :star_struck:

I hope you can make it work now, good luck Andrew!

(totally unrelated, but I just realized there’s a cake emoji :cake: next to my name because today is my 2nd-year anniversary on the forum haha. That’s funny)

1 Like

Probably something like “Hey Siri, up the bid on the Ferrari by 5,000”

1 Like

When I implemented Siri Shortcuts it was in the iOS 14 days, so no App Intents.

This my journal entry about it: Christopher's HealthKit App Challenge Journal - #37 by xpher0408

I referenced this tutorial https://www.answertopia.com/swiftui/a-swiftui-siri-shortcut-tutorial/, starting from the “Adding the Intents Extension” section.

In theory, it should still work with iOS 16.

At the time, I didn’t do Intents UI since you need to use UIKit for that. I think with App Intents you can use SwiftUI, but I could be wrong about that.

Seems @CalStark 's method would be the way to go for App Intents.

2 Likes

Yes @xpher0408, this is pure SwiftUI! Including the customization of the image, message etc in the shortcut popups. It’s surprisingly little code. The old way of doing this looks difficult haha

1 Like

Hi all, thanks so much for taking the time to respond, and provide closer points to getting this to work!!

I’ll try getting their SoupKit tutorial to build again per @mikaelacaron.

Meanwhile, I’d much rather use the new methods/ shorter stuff @CalStark found! Raphael, merci becoup! Thanks so much for taking the time to write all that stuff out, leaving multiple links; key points in the video, and most importantly your thoughts and analysis!

You even answered one of my other questions, how to change my app’s name! It looked important to me the way the code was written.

Although, it’s unfortunate that it sometimes takes Siri a few hours to “discover” the app.

Good to know the code-as-is builds shortcuts without user interactions, but I’m so glad you got it to work! This will be a major feature in my app :slight_smile:

Will let you all know how it goes, thanks!!

1 Like

Mais de rien mon ami!

Can’t wait to see your app :wink: Good luck Andrew!

1 Like

@CalStark I’m a little closer thanks to your help!

I can now ask Siri to “add one to MyCounter,” which will then launch the app. For some reason, it does not add it to my counter though. I’ll keep figuring around with it though/ trying different phrases.

Very grateful again for your thorough research! I’d love to use the latest frameworks from Apple to get this working. The code’s way simpler compared to older styles

1 Like

That’s big progress!! Getting Siri to launch the app was the hard part for me.

What happens when you try to manually trigger the shortcut from your phone’s shortcuts app? Does the shortcut successfully increment the counter?