Shortcuts

RSS for tag

Help users quickly accomplish tasks related to your app with their voice or with a tap with the Shortcuts API.

Shortcuts Documentation

Posts under Shortcuts tag

91 Posts
Sort by:
Post not yet marked as solved
1 Replies
207 Views
I recently bought some smart outlets and nfc chips so that when I tap my phone to them my lights turn on. Although when I go to set up the automation on shortcuts it doesn’t work. I’m setting it up as “When NFC chip is scanned” ”If Outlet is On/Off” Then there is no option to change it. It just detects if it’s on or not and I can’t seem to find a way to have it detect it then change it.
Posted
by
Post not yet marked as solved
0 Replies
166 Views
I am adding Siri Shortcuts to my navigation app. I understood in order to use Siri voice to trigger shortcuts, for custom intents, the users have to add voice phrases or record voice for shorctus by Add to Siri button or built-in Shortcuts app; for system intents, the users don't need to do that because Siri already knows all the trigger voice phrases. But when I say "Navigate to the station using Google Maps", the whole shortcut works without adding to Siri manullay. And based on https://developer.apple.com/documentation/sirikit, I couldn't find any system intents related to Navigation Domain. Did I misunderstand anything here? How could Siri and Google Maps exchange intents here without system navigation intents or adding to Siri manually?
Posted
by
Post not yet marked as solved
0 Replies
213 Views
I have developed a siri shortcut where user can order coffee using siri voice commands. This shortcut asks users about the payment method to be used while ordering the coffee. Is it possible to integrate support for apple pay while ordering coffee in the siri shortcut. I've been reading documentation but i couldn't find any support in implementing apple pay in siri shortcut. I want to ask if its doable, please provide some help or sample code to achieve it or if its not doable i want to have something to show to my employer.
Posted
by
Post not yet marked as solved
0 Replies
224 Views
Hello I am new to this field. Thanks for your understanding. I have this small automator programme which works fine on run {input, parameters} set dateString to do shell script "date +'%Y.%m.%d'" tell application "System Events" keystroke dateString end tell end run When I'm trying to run it from system preferences/keybord/services I get this error The action “Run AppleScript” encountered an error: “The operation couldn’t be completed. (com.apple.Automator error -212.)” My Mac version is 11.6.3 Where is the bug? Thanks
Posted
by
Post not yet marked as solved
3 Replies
239 Views
According to the 2021 WWDC video “Meet Shortcuts for macOS”, all I have to do is add the Intents file to my application, build it, and immediately the actions will be available in Shortcuts/Mac. This is most definitely not my experience, I've added the Intents file, configured some intents, and build my application, but nothing shows up in Shortcuts. So clearly I am missing something. My Application is an Objective C++ app, designed to run in the background (Keyboard Maestro Engine), and I'm trying to add some Shortcut actions to it, but I have had no luck getting them to appear at all. Any suggestions on what to try or what more I need to do to get them to show up?
Posted
by
Post not yet marked as solved
1 Replies
244 Views
Hello, My app is facing a crasher with users albeit not a lot just a couple here and there. I've been trying to figure out the root cause but I'm not getting much information. Has anyone experienced this before? This is where the crash happens: 1 IntentsUI -[INUIEditVoiceShortcutViewController remoteViewControllerDidDeleteVoiceShortcutWithIdentifier:] + 88 2 IntentsUI -[INUIVoiceShortcutHostViewController remoteViewControllerDidDeleteVoiceShortcutWithIdentifier:] + 100 Not sure if it's related to something on my end as there are no memory leaks and I tested on device. Any input would be appreciated. Thanks.
Posted
by
pud
Post not yet marked as solved
0 Replies
167 Views
Going hiking and wanted to see if I or someone me could develop a shortcut that sends me an alert when cell service is available. It would be nice to have it also place a pin on the map after alert. Any thoughts on this? Bob
Posted
by
Post not yet marked as solved
0 Replies
289 Views
I would like to allow users to run an Apple Watch App action by using automations on the iPhone. The action can only be done on the watch and not the companion iPhone app? I noticed that it's possible to start a workout on the default Apple watch app with automations, and also possible to start a workout on the 3rd party Dawn Patrol app using automations. Is it possible to do this with custom intents or NSUserActivities or only the system start workout intent?
Posted
by
Post not yet marked as solved
0 Replies
216 Views
Hello, I've built a shortcut that crops images into a square format of (width x width). The shortcut works well for photographs, but not so for screenshots. While the result is a square image, the size is smaller by a factor of 3.123 on each side. Also the resulting image seems to be squashed vertically
Posted
by
Post not yet marked as solved
0 Replies
193 Views
Hello. I've made a shortcut to convert an image from native format to png. The shortcut works as advertised for photos, but not for screenshots. For instance, a screenshot of resolution (1125x2436), when converted to png/jpg becomes 360x780)
Posted
by
Post not yet marked as solved
5 Replies
426 Views
I've taken the code from the WWDC video and are trying to run a shortcut via ScriptingBridge: import ScriptingBridge @objc protocol ShortcutsEvents {   @objc optional var shortcuts: SBElementArray { get } } @objc protocol Shortcut {   @objc optional var name: String { get }   @objc optional func run(withInput: Any?) -> Any? } extension SBApplication: ShortcutsEvents {} extension SBObject: Shortcut {} and guard let app: ShortcutsEvents = SBApplication(bundleIdentifier: "com.apple.shortcuts.events"), let shortcuts = app.shortcuts else { throw "error" } print("getting short") guard let shortcut = shortcuts.object(withName: shortcutName) as? Shortcut else { throw "error" } print("running short", shortcut) let res = shortcut.run?(withInput: input) print("shotcut result", res ?? "nil") While I am getting the shortcut object just fine running short <SBObject @0x6000035c8e40: <class 'srct'> "append" of application "Shortcuts Events" (16450)> running it, just does nothing and returns nil shotcut result nil Running the shortcut via cli works as expected. I (hopefully) have set the entitlements correctly but I am feeling a little stumped not to even get an error at all. What am I doing wrong there?
Posted
by
Post not yet marked as solved
0 Replies
189 Views
Can we assign any other value than 1, in the repeat index in shortcuts? In Automator, we are able to change the start number while doing any sequential operations.
Posted
by
Post not yet marked as solved
0 Replies
173 Views
Hi I love Shortcuts and Automation on iPhone. I would love to create an automation that allows Siri to say "Person X has texted you" when person X texts me on WhatsApp AND when I have a certain Focus active. Is this at all possible? Thanks for your help. Alexander Belgium
Posted
by
Post not yet marked as solved
0 Replies
596 Views
Hi all, am using the iPhone 13 pro and recently had a update to iOS 15.2.1 which has caused me not to be able to open 3rd party apps. All my apps are using the shortcuts feature. However even when using the search bar to open the original app without shortcut it doesn’t work. pls help :(
Posted
by
Post not yet marked as solved
0 Replies
235 Views
Hi, I Created a simple shortcut for renaming the files, it's working fine up to 1500 files but not more than that. But I have an old WhatsUp image backup folder containing more than 25k files where my shortcut is failing even its not work for 1501 files. Is there any limitation to handling the number of files in shortcuts? If YES, How I can increase that?
Posted
by
Post not yet marked as solved
0 Replies
223 Views
I want just to make request action by clicking on app widget. I know that in iOS by clicking on app widget app is opened anyway. Only deeplinking is working. Question - maybe it's possible to open shortcut from widget using deeplinking this (below) or any different way? widgetURL(URL(string: "shortcuts://run-shortcut?name=[name]&input=[input])) Thanks for any help.
Posted
by
Post not yet marked as solved
1 Replies
319 Views
Menu("+") { Button("add") { print("add") } .keyboardShortcut("a", modifiers: [.command]) } The menu button not show keyboard shortcut label, and the shortcut function can not be used. I don't know if this is a bug or a function lack, obviously it not working as I expected. My environment: macOS Monterey 12.1 (21C52) XCode 13.1
Posted
by
Post not yet marked as solved
0 Replies
276 Views
Good afternoon, Team - I would like guidance on how to create the following ShortCut: STEPS: Start Voice Memo on Apple Watch Initiate Theater Mode on Apple Watch Initiate Silent Mode on Apple Watch Thanks in advance for taking the time to look into this. Regards, Wilgen
Posted
by
Post not yet marked as solved
0 Replies
420 Views
Hi there, I'm implementing a custom IntentHandler, which has a parameter. This parameter is an array of strings. I'd like to handle the case when user didn't specify the value for this parameter. I want to provide a value calculated using my business logic and ask the user to confirm that value. To do this, I use the resolveParameter function and return the following result: [INStringResolutionResult.confirmationRequired(with: someSuggestedValue)] Unfortunately, Siri throws an error with the message: "Uh oh, there's a problem. Please try again." using debug I caught the error, here's the error message: libc++abi: terminating with uncaught exception of type NSException Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected class Swift.__SwiftDeferredNSArray' terminating with uncaught exception of type NSException Here's a part of my code. func resolveParameter(for intent: MyCustomIntent) async -> [INStringResolutionResult] { if intent.arrayOfMyCustomParameters?.isEmpty ?? true { // Users did not specify the value intent.arrayOfMyCustomParameters = [someSuggestedValue] return [INStringResolutionResult.confirmationRequired(with: someSuggestedValue)] } else { var result = [INStringResolutionResult]()             for value in intent.arrayOfMyCustomParameters {                 result.append(.success(with: value))             }             return result } } p.s. This problem occurs only using the shortcut from the Siri voice assistant for iOS 15.0.0+ devices. Not sure if this is helpful, but here is the stack trace. libobjc.A.dylib`objc_exception_throw: -> 0x198f37670 <+0>: stp x28, x27, [sp, #-0x40]! 0x198f37674 <+4>: stp x22, x21, [sp, #0x10] 0x198f37678 <+8>: stp x20, x19, [sp, #0x20] 0x198f3767c <+12>: stp x29, x30, [sp, #0x30] 0x198f37680 <+16>: add x29, sp, #0x30 ; =0x30 0x198f37684 <+20>: sub sp, sp, #0xfc0 ; =0xfc0 0x198f37688 <+24>: mov x20, x0 0x198f3768c <+28>: mov w0, #0x20 0x198f37690 <+32>: bl 0x19902ea70 ; __cxa_allocate_exception 0x198f37694 <+36>: mov x19, x0 0x198f37698 <+40>: adrp x8, 372380 0x198f3769c <+44>: ldr x8, [x8, #0xb68] 0x198f376a0 <+48>: mov x0, x20 0x198f376a4 <+52>: blr x8 0x198f376a8 <+56>: mov x20, x0 0x198f376ac <+60>: adrp x8, 13442 0x198f376b0 <+64>: add x1, x8, #0x959 ; =0x959 0x198f376b4 <+68>: bl 0x198f24040 ; objc_msgSend 0x198f376b8 <+72>: str x20, [x19] 0x198f376bc <+76>: adrp x8, 342105 0x198f376c0 <+80>: add x8, x8, #0x78 ; =0x78 0x198f376c4 <+84>: add x8, x8, #0x10 ; =0x10 0x198f376c8 <+88>: mov x21, x19 0x198f376cc <+92>: str x8, [x21, #0x8]! 0x198f376d0 <+96>: mov x0, x20 0x198f376d4 <+100>: bl 0x198f37270 ; object_getClassName 0x198f376d8 <+104>: str x0, [x19, #0x10] 0x198f376dc <+108>: cbnz x20, 0x198f376e8 ; <+120> 0x198f376e0 <+112>: mov x8, #0x0 0x198f376e4 <+116>: b 0x198f376f4 ; <+132> 0x198f376e8 <+120>: tbnz x20, #0x3f, 0x198f3779c ; <+300> 0x198f376ec <+124>: ldr x8, [x20] 0x198f376f0 <+128>: and x8, x8, #0xffffffff8 0x198f376f4 <+132>: str x8, [x19, #0x18] 0x198f376f8 <+136>: adrp x22, 377914 0x198f376fc <+140>: ldrb w8, [x22, #0x2c6] 0x198f37700 <+144>: cbz w8, 0x198f37720 ; <+176> 0x198f37704 <+148>: mov x0, x20 0x198f37708 <+152>: bl 0x198f37270 ; object_getClassName 0x198f3770c <+156>: stp x20, x0, [sp, #0x8] 0x198f37710 <+160>: str x19, [sp] 0x198f37714 <+164>: adrp x0, 28 0x198f37718 <+168>: add x0, x0, #0xae9 ; =0xae9 0x198f3771c <+172>: bl 0x198f4957c ; _objc_inform 0x198f37720 <+176>: adrp x8, 377914 0x198f37724 <+180>: ldrb w8, [x8, #0x2c7] 0x198f37728 <+184>: cbz w8, 0x198f37780 ; <+272> 0x198f3772c <+188>: ldrb w8, [x22, #0x2c6] 0x198f37730 <+192>: cbnz w8, 0x198f37750 ; <+224> 0x198f37734 <+196>: mov x0, x20 0x198f37738 <+200>: bl 0x198f37270 ; object_getClassName 0x198f3773c <+204>: stp x20, x0, [sp, #0x8] 0x198f37740 <+208>: str x19, [sp] 0x198f37744 <+212>: adrp x0, 28 0x198f37748 <+216>: add x0, x0, #0xae9 ; =0xae9 0x198f3774c <+220>: bl 0x198f4957c ; _objc_inform 0x198f37750 <+224>: add x0, sp, #0x20 ; =0x20 0x198f37754 <+228>: mov w1, #0x1f4 0x198f37758 <+232>: bl 0x1941a3b34 0x198f3775c <+236>: mov x22, x0 0x198f37760 <+240>: adrp x8, 342104 0x198f37764 <+244>: ldr x8, [x8, #0xd18] 0x198f37768 <+248>: ldr x0, [x8] 0x198f3776c <+252>: bl 0x1941a3df8 0x198f37770 <+256>: mov x2, x0 0x198f37774 <+260>: add x0, sp, #0x20 ; =0x20 0x198f37778 <+264>: mov x1, x22 0x198f3777c <+268>: bl 0x198f4a8cc ; symbol stub for: backtrace_symbols_fd 0x198f37780 <+272>: mov x0, x20 0x198f37784 <+276>: nop 0x198f37788 <+280>: adrp x2, 3 0x198f3778c <+284>: add x2, x2, #0xac0 ; =0xac0 0x198f37790 <+288>: mov x0, x19 0x198f37794 <+292>: mov x1, x21 0x198f37798 <+296>: bl 0x198f4a7d0 ; symbol stub for: __cxa_throw 0x198f3779c <+300>: adrp x8, 372380 0x198f377a0 <+304>: add x8, x8, #0xae0 ; =0xae0 0x198f377a4 <+308>: and x9, x20, #0x7 0x198f377a8 <+312>: ldr x8, [x8, x9, lsl #3] 0x198f377ac <+316>: adrp x9, 372380 0x198f377b0 <+320>: add x9, x9, #0x258 ; =0x258 0x198f377b4 <+324>: cmp x8, x9 0x198f377b8 <+328>: b.ne 0x198f376f4 ; <+132> 0x198f377bc <+332>: ubfx x8, x20, #55, #8 0x198f377c0 <+336>: adrp x9, 372380 0x198f377c4 <+340>: add x9, x9, #0x2e0 ; =0x2e0 0x198f377c8 <+344>: ldr x8, [x9, x8, lsl #3] 0x198f377cc <+348>: b 0x198f376f4 ; <+132> 0x198f377d0 <+352>: udf #0x0 0x198f377d4 <+356>: udf #0x0
Posted
by