Can we test SIRIKit extensions in IOS Simulator :
Asked Answered
O

6

15

I am trying to develop an app extension using sirikit, but when i am trying to run it on simulator iphone 7plus, it is giving the following error :-

SpringBoard was unable to service the request.

Can anyone please tell me whether IOS Simulator support SIRIKit extension or not !

Odoric answered 21/11, 2016 at 6:13 Comment(2)
Support has been added, please see https://mcmap.net/q/761480/-can-we-test-sirikit-extensions-in-ios-simulatorGlaswegian
Yes its available you can check updated answer below with screenshotsSelfmastery
A
19

Edit

For Xcode 8.3 or above you will be able to use Siri in Simulator. The steps are -

1) Enable Siri from the settings of Simulator.

2) From the Hardware select Siri

Here are some images for reference -

Step 1 -

enter image description here

Step 2 -

enter image description here

Step 3 -

enter image description here

Step 4 -

enter image description here

Outdated Answer

No you can't do that in Simulator

Check this

To run and debug your Intents extension on a device Select the build scheme for your Intents extension. When you add an Intents extension to your project, Xcode automatically creates a build scheme for running that extension. Configure the scheme to run on an attached device. You cannot debug your Intents extension in the simulator. Select Product > Run to launch your extension on the device. When prompted by Xcode, select Siri (or Maps) as the app to run. Xcode builds your app and extension, installs them on the device, and launches the app you selected.

Reference - here

Antenatal answered 21/11, 2016 at 6:18 Comment(1)
It's important to select the right Audio Input Source. For checking that: Hardware -> Audio InputTrepidation
M
8

In Xcode 9 you can test Siri tasks by UI Tests. They talk about it in the end of this WWDC session. Basically it looks kinda like this:

    let siri = XCUIDevice.shared.siriService
    siri.activate(voiceRecognitionText: "How many points are on my credit card?")
    let predicate = NSPredicate {(_, _) -> Bool in
        sleep(5)
        return true
    }

    let siriResponse = expectation(for: predicate, evaluatedWith: siri, handler: nil)
    self.wait(for: [siriResponse], timeout: 10)
Meantime answered 17/8, 2017 at 16:13 Comment(0)
S
6

Yes update your XCode Version :8.3.1 and above support SIRI in simulator.

STEP-1 :

enter image description here

STEP-2 Enable SIRI from Settings in Simulator

STEP-3 Hardware--->SIRI

enter image description here

Selfmastery answered 12/4, 2017 at 8:42 Comment(1)
had to download a preview version of XCode 8.3.2 see itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12Janelljanella
A
3

Apple docs say:

You cannot debug your Intents extension in the simulator.

Update: This has changed in Xcode 8.3.

Artima answered 21/11, 2016 at 6:17 Comment(2)
Adding URL to the Doc: developer.apple.com/library/content/documentation/Intents/…Staffman
Oh I am sorry, didn't notice it over there.Staffman
E
2

Now You can use in Xcode 8.3.1

[PREVIOUS ANSWER]

According to the Apple Docs

No, you can't

Eddington answered 21/11, 2016 at 6:50 Comment(0)
B
0

Starting from Xcode 8.3 you can invoke Siri using Hardware > Siri after enabling Siri in the Settings app on Simulator.

Brierwood answered 28/3, 2017 at 8:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.