sirishortcuts

How do I check if my app is resumed by a Siri shortcut

青春壹個敷衍的年華 提交于 2021-02-11 14:37:57
问题 I am working with Siri shortcuts . I wanted to know if my app is launched from a Siri shortcut in the following cases: When the application is running in the background When the application is not running in the background For case 2 , I can use the " didFinishLaunchingWithOptions " method but for case 1 , I am not sure what approach to use. I would appreciate any suggestions and thoughts on this topic. Thank you. 回答1: You can implement this check in your AppDelegate func application(_

Siri shortcuts rounding number in “Get Contents of URL” POST

爱⌒轻易说出口 提交于 2020-01-15 09:42:29
问题 I am trying to create a iOS 12 Shortcut based on the Gautrain API. I want to do a POST to the URL https://api.gautrain.co.za/transport-api/api/0/journey/create with the following payload: { "geometry": { "coordinates": [ [ 28.23794, -25.74762 ], [ 28.05693, -26.10858 ] ], "type": "MultiPoint" }, "profile": "ClosestToTime", "maxItineraries": 3, "timeType": "DepartAfter", "only": { "agencies": [ "edObkk6o-0WN3tNZBLqKPg" ] } } I have entered all these details into a "Get Contents of URL" block.

How to customise SiriKit intent extension for shortcuts app to ask allow access?

谁说我不能喝 提交于 2019-12-24 18:50:23
问题 We are allowed to build custom intent for Siri, by extending SiriKit. Moreover, Apples present how to manage basic integrations and customizations to Siri Shortcuts and Shortcuts app Link for shortcuts app Nonetheless, some apps have their own shortcuts UI with a little customization; for instance with the button to allow access for API, how can we do that? In the documentation presented by Apple, there is no such instruction for how is it possible to customize the UI inside the shortcuts app

INVoiceShortcutCenter.shared.getAllVoiceShortcuts does not return anything in iOS 13

别来无恙 提交于 2019-12-12 12:22:03
问题 I am not sure what I am doing wrong. But in this method INVoiceShortcutCenter.shared.getAllVoiceShortcuts { (vShortCuts, error) in print(vShortCuts) } vShortCuts is an empty array. var suggestions = [INShortcut]() let userActivity = NSUserActivity.init(activityType: "com.riyaz.testactivity") userActivity.title = "test activity" let shortCut = INShortcut.init(userActivity: userActivity) suggestions.append(shortCut) INVoiceShortcutCenter.shared.setShortcutSuggestions(suggestions) I donated a

How to stop announcing of Siri Shortcuts Parameters over headsets (iOS 13)?

放肆的年华 提交于 2019-12-11 16:44:44
问题 Whenever I invoked Siri Shortcut say "HomeControl" and if my iPhone is not connected with any bluetooth device then Siri say's "What can I do for you" (Disambiguation Prompt) after this show the list of all parameters and ready to listen. But if my iPhone is connected with any Bluetooth device then Siri Say's "What can I do for you" (Disambiguation Prompt) and after this announced all the parameters like "Turn Off the fan", "Turn On the fan" .... etc. What i want to do is :- I want to stop

How to provide some action to Siri shortcuts app?

狂风中的少年 提交于 2019-12-11 06:06:18
问题 From that question How to customise SiriKit intent extension for shortcuts app to ask allow access? I found out that some actions (for well-known apps) are provided by shortcuts app itself, so how can I provide for shortcuts app my own actions to my web service? How can I publish some web service action to my app for shortcuts library actions? 来源: https://stackoverflow.com/questions/58054290/how-to-provide-some-action-to-siri-shortcuts-app

Can an INIntent property be given the value “Ask Each Time”?

梦想与她 提交于 2019-12-11 02:18:32
问题 Let's say I've defined a custom intent, called FooIntent , in an .intentdefinition file. It has a single parameter, bar , of type Decimal , for which: - User can supply value in Siri and Shortcuts app is active. - Default Value is 0 . Its autogenerated class definition now looks like this: public class FooIntent: INIntent { @NSManaged public var bar: NSNumber? } If I construct a FooIntent , set bar to nil , and pass it into a INUIAddVoiceShortcutViewController : let intent = FooIntent()