Siri Shortcuts Tutorial in iOS 12 | raywenderlich.com

In this iOS 12 tutorial, you’ll learn how to build Siri Shortcuts for your app to surface in Spotlight as well as command Siri with your voice.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/6462-siri-shortcuts-tutorial-in-ios-12

Hello,

I read your tutorial and wrote my own siri intent enabled app. Everthing works fine so far. There is only one problem. I always get back a generic answer, if siri runs my intent. I have created an intent and set a custom failure and success text. But Siri never says the text. I only get “OK. Posted” as response. I have the same problem with you final sample?

Do you have any idea what`s wrong? I use iOS 12.1.1.

The sample code has errors. I can’t get it to compile.

Please tell us exactly what you’re seeing.

Hey guys,

Great tutorial. It is missing one important part though. It doesn’t cover the Add to Siri button functionality that was demoed at the WWDC2018. I have been playing with that option but there are some issues with it.

Going over the Soup Chef app from Apple, it works for them well, show the Added to Siri tick when the shortcut is already setup. But I can’t seem to get the same functionality going. Stackoverflow also seems to be very confused about the situation.

Any thoughts?

@dankorkelia Do you still have issues with this?

Hi, this tut is really nice. Congrats!

I have one question: how have you added the “Intents” and “IntentsUI” frameworks to the “starter” version of the project?

Thanks.

@gazdaddy Can you please help with this when you get a chance? Thank you - much appreciated! :]

Unfortunetly custom intents doesn’t work on simulator and device :frowning: After “Post” I have error “There was a problem. Try again
”

I was trying to follow this tutorial in my own project, which has a few Cocoapods and a Swift bridging header. Upon creating the Intents Extensions target, the bridging header will no longer compile because it fails to find any of the files I’m importing. Any suggestions on what could cause that or how to fix it?

@hisserbee Do you still have issues with this?

Yes, I am still having issues with this. I couldn’t find anyone having a similar problem online, at least not where the problem is triggered by an Intents Extension or adding a target, as opposed to badly configured Cocoapods.

Can you managed to fix it?

The answer was - localize .intentdefinition file

1 Like

@gnatyuk Thank you for sharing this - much appreciated!

You are welcome :slight_smile:

Hi,

This is a great tutorial and very useful :slight_smile:
But I think I did something wrong
 You said " Xcode generated it (the PostArticleIntent class) for you when you created the ArticleIntents.intentdefinition file", but it doesn’t
 Xcode say “Use of unresolved identifier ‘PostArticleIntent’”


When I run TheBurgeoningWriter-Completed the same issue happens :confused:

Do you know what’s going wrong ? Thanks in advance :smiley:

I juste find what was wrong, actually Xcode created a class named IntentIntent, don’t know why but I could change that in the Identity inspector, you’ll see Custom class with a text field named Class Name :wink:

Hi all, thanks for this thorough tutorial!

After adding the WritingIntents extension, the article suggests trying to build and run, but, when I did, I received this error: “This app or an app that it contains has a Siri Intents app extension that is missing the IntentsSupported array in the NSExtensionAttributes dictionary in the NSExtension dictionary in its Info.plist.”

The solution was just a couple lines below: “make sure ArticleIntents.intentdefinition is visible to the extension.”

May I kindly suggest moving this line above the instruction to build and run? Many thanks!

I’m getting this error after i create PostArticleIntentHandler

Class PostArticleIntentResponse is implemented in both /private/var/containers/Bundle/Application/3D30EB5D-1033-47BF-A2D7-C7E9EF6B34B7/TheBurgeoningWriter.app/Frameworks/ArticleKit.framework/ArticleKit (0x1031e1070) and /var/containers/Bundle/Application/3D30EB5D-1033-47BF-A2D7-C7E9EF6B34B7/TheBurgeoningWriter.app/TheBurgeoningWriter (0x102e34e68). One of the two will be used. Which one is undefined.