Gonesh
Gonesh

Reputation: 49

siri replay's like "Sorry, there was a problem with the app"

I was just trying to integrating custom siri intent into my app.i have done code for intent handler and i can able to create shortcut but when i run my shortcut. i'm unable to open my app. see this image https://i.sstatic.net/m2fby.png

Upvotes: 3

Views: 1314

Answers (3)

Daniel Jermaine
Daniel Jermaine

Reputation: 9

Check the version of your Siri target if its higher than the debugging phone version. it will display that error if it is, Change all version to the same version and make sure the debugging version is lesser or equal to the project version

Upvotes: 0

Aditya Deshmane
Aditya Deshmane

Reputation: 4722

If you missed handling intent then also you might come across this error. Check file IntentHandler.swift

class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling {

        override func handler(for intent: INIntent) -> Any {

            return MyIntetHandler() //Here, If you are returning self that means you have not handled it.
        }
......

Sample intent handler code, the intent name I have created is My, protocol MyIntentHandling is autogenerated you just need to confirm it.

class MyIntetHandler: NSObject, MyIntentHandling
{
    func handle(intent: MyIntent, completion: @escaping (MyIntentResponse) -> Void) {
        completion(MyIntentResponse(code: .success, userActivity: nil))
    }
}

Upvotes: 1

Mosbah
Mosbah

Reputation: 1385

A possible solution is to make sure that your Intent does not take too much memory (~<20Mb) and respond in reasonable time (<5s)

Upvotes: 2

Related Questions