Automation & Scripting

RSS for tag

Learn about scripting languages and automation frameworks available on the platform to automate repetitive tasks.

Automation & Scripting Documentation

Posts under Automation & Scripting subtopic

Post

Replies

Boosts

Views

Activity

Siri spawns multiple processes that don't die
When asking Siri to run a shortcut, it will spawn two processes called BackgroundShortcutRunner that do not die when the shortcut is done running. If the Siri window is on screen when I speak to have the shortcut run it does not spawn those two processes. However if the Siri window is not on screen when I speak, the Siri window appears and spawns these two processes. The two processes do not terminate once the shortcut is done running. I now have over 200 these processes since rebooting three days ago to install 26.4. FB22015192
2
1
194
Feb ’26
SiriKit: INPlayMediaIntent with a targeted speaker
I've got a streaming Radio app that loads an HLS stream into an AVAudioPlayer. I've set up an Intents extension that notifies SiriKit that my app must handle the INPlayMediaIntent in app, and, I'm able to successfully initiate the stream playing from my phone using the string "Play ". My intent handler in app looks like this: completionHandler(INPlayMediaIntentResponse(code: .success, userActivity: nil)) DispatchQueue.main.async { AudioPlayerService.shared.play() } The Audio Player service, in its init, does the following: try AVAudioSession.sharedInstance().setCategory( .playback, mode: .default, policy: .longFormAudio ) Additionally, in my Info.plist, I have the AirPlay optimization policy set to Long Form Audio. Having said all that, when I try to route my app to play "on a given HomePod speaker" ("play on ") the speaker routing instructions are never followed. I've looked and not been able to find where I might be able to instruct my app to follow the correct path here. I was assuming I could not trigger this behavior manually, as I believe I don't really have any control over AirPlay routing. Is there any guidance for working with SiriKit to do the right thing with regards to audio routing?
0
0
264
Feb ’26
App Shortcut parameter title in Spotlight does not update after updateAppShortcutParameters()
We use AppShortcutsProvider with a parameterized App Shortcut. One of the entities has a dynamic display title (e.g. "Everyone is searching: {keyword}") that comes from UserDefaults and is returned in EntityQuery.suggestedEntities() and entities(for:). When we change the keyword and call updateAppShortcutParameters(), the Shortcuts app updates and shows the new title. In Spotlight (Siri Suggestions), the displayed title stays on the old value (e.g. still shows "Everyone is searching: 456" after we switched to "123"). On tap, the shortcut runs with the new value (123), so the execution is correct; only the displayed title in Spotlight is stale. Question: Is this expected? Is there any API or recommended approach to invalidate or refresh the Spotlight suggestion so the displayed title matches the current parameter, or should we avoid dynamic titles for the first suggestion for better UX?
0
0
287
Feb ’26
Numbers Extension in Shortcuts
I am building an automation using Shortcuts. The shortcut reads text from my Notes, sends it to Apple Intelligence, converts the result into dictionary values, and then saves those values into a Numbers sheet by adding rows through a form. The problem is that when the automation processes multiple lines and adds multiple rows, the Numbers app opens every time a row is added. I would like this process to run automatically at a scheduled time without opening the Numbers app repeatedly on my iPhone. Is there a way to update the Numbers sheet in the background without launching the Numbers app? Please let me know if there is a solution.
1
0
157
Mar ’26
Can I use AppIntent with tvOS?
The AppIntent feature is available on tvOS since OS 16. https://developer.apple.com/documentation/appintents I tried a real basic integration where I just want simply open a specific tab in my tabbar. But the perform action gets never called. Is it really possible already to use AppIntent on tvOS? Or is this feature still mostly targeted for mobile devices? Also, the documentaiton says so often something about shortcuts app and features, that are not available on tvOS, that I started doubting that the AppIntent is really usable on tvOS. If AppIntents are available and usable for tvOS, what could be wrong, so that I do not see the expected results?
0
0
111
1w
AppEntity / EntityQuery returns multiple results but Shortcuts only displays a single item on newest iOS 26.4
We are observing a regression in iOS 26.4 related to AppIntents, specifically AppEntity + EntityQuery. When using a single AppIntent with a parameter backed by AppEntity and EntityQuery, the query correctly returns multiple entities (e.g. ~50 items). However, in the Shortcuts app UI, only a single item is displayed. This behavior differs from iOS 26.3 and earlier, where all returned entities are correctly displayed in the selection list. This issue significantly impacts dynamic configuration use cases where AppEntity is used to represent server-driven or runtime-generated options.(The screenshots below illustrate the difference in shortcut presentation between iOS 26.4 and earlier versions.)
1
2
123
3d
Siri Shortcuts Not Recognized on HomePod mini (audioOS 26.4) – Delegates to Built-in Responses Instead
Bug Report Environment 4× HomePod mini, audioOS 26.4 (23L243) iPhone, iPad, Mac – all running latest OS versions (iOS/iPadOS/macOS 26) iCloud account active, Shortcuts sync enabled on all devices Summary Siri no longer executes custom Shortcuts on any HomePod mini. Instead, the HomePod responds with built-in Siri answers or refers to the internet, as if no custom Shortcuts were registered. The same Shortcuts work correctly via Siri on iPhone, iPad, and Mac. Reproducible Test Case Created a new Shortcut named "Lemon Blue Seven" from scratch – no resemblance to any built-in Siri command, single action: spoken text output. Result: Mac: recognized and executed correctly via Siri iPhone / iPad: recognized and executed correctly via Siri (after re-registration, see below) All 4 HomePod mini: not recognized – Siri responds as if the Shortcut does not exist Steps to Reproduce Create a new Shortcut with a unique name and a single spoken output action Ensure iCloud Shortcuts sync is active on all devices Invoke via Siri on HomePod mini: „Run [Shortcut name]" HomePod responds with a built-in Siri answer instead of executing the Shortcut Additional Observations The issue appeared without any user-initiated changes to the setup Deleting all Shortcuts and re-importing them manually caused Siri registration to also break on iPhone and iPad; this was resolved by disabling iCloud Shortcuts sync, restarting the devices, and re-enabling sync The HomePod issue persisted through this fix – suggesting the HomePod's Intent delegation is broken independently of the hub device's registration state When a Shortcut name resembles a built-in command (e.g. „What time is it?"), the HomePod executes the built-in command instead – confirming it does not consult the user's Shortcut registry at all Troubleshooting Already Performed Multiple HomePod restarts Full factory reset and re-setup of HomePod (multiple times, also tested with only one HomePod active) Voice recognition re-trained Personal Requests disabled and re-enabled iCloud Shortcuts sync disabled on all devices, devices restarted, sync re-enabled sequentially All Shortcuts deleted and manually re-imported Home Hub verified: Bathroom HomePod registered as Home Hub, status „Connected" Tested with a separate Home setup Contacted Apple Support – no resolution provided Expected Behavior Siri on HomePod mini recognizes and executes user-defined Shortcuts by name, as it did prior to this issue and as it continues to do on iPhone, iPad, and Mac. Actual Behavior Siri on HomePod mini ignores user-defined Shortcuts entirely and falls back to built-in responses.
0
0
72
1w
Bug: Finder/AppleScript interaction
I have created a simple AppleScript that makes a folder named with today’s date. For many years, it has worked fine except: If I run the script (from a script app in the menu bar), then dump files into the folder, then change the colored “Tag” on the folder, I get a Finder error - An unexpected error occurred (error code -8076) - and I have to force-quit the Finder to complete the color tagging. If it change the tag before dumping the files, no error occurs. (Please hold the “Doctor, it hurts when I do this …” jokes.) This error has persisted through many macOS major iterations, including Tahoe 26.4.1. Prolly a Finder bug, but not sure. Here’s the source, for anyone interested. set dateStr to getDate() --display dialog dateStr tell application "Finder" activate try --set thisFolder to (the target of the front window) as alias set thisFolder to (the target of the front window) as string make new folder at thisFolder with properties {name:dateStr as string} on error errMsg display dialog "ERROR: " & errMsg end try end tell on getDate() set theDate to current date set theYear to year of theDate as string set theNewYear to third character of theYear & fourth character of theYear set theMonth to month of theDate as number as string if length of theMonth = 1 then set theMonth to "0" & theMonth as string end if set theDay to day of theDate as string if length of theDay = 1 then set theDay to "0" & theDay as string end if return theNewYear & " " & theMonth & " " & theDay as string end getDate
3
0
91
4d
Shortcuts: Can not access submenu of inserted variables inside of newly created dictionaries on mac
While I was creating a shortcut using the dictionary function I encountered a bug. When creating a new dictionary to store the date and some other stuff I set a value to the current date variable. I went to change the date format to one I preferred I was unable to access the submenu to do so. To figure out what was going on I did some testing and here is what I found: You can't access the submenu of any inserted variable This only happens in newly created dictionaries You can be fix the dictionary by simply closing and opening the shortcut This bug does not happen on Iphone How to make this bug happen: Open any shortcut Create a new dictionary Add a variable in the value field You can no longer access the sub menu to edit the variable.
1
0
50
4d
Mac App Store review policy for Apple Event temporary exception entitlements
I’m looking for some advice regarding the usage of temporary exception entitlements in Mac App Store apps. Specifically the Apple Event Temporary Exception to communicate with other third party applications (not first-party macOS system apps): The Best Practices for Submitting Scriptable and AppleScript Apps to the Mac App Store section is a bit vague (how to 'request' a temporary entitlement?) and I couldn't find it mentioned in the Review Guidelines. Before designing, implementing and testing functionality based on the Apple Event Temporary Exception I’d like to know if these entitlements would: A. Always be rejected on the Mac App Store B. Only accepted in highly specific use cases C. Accepted if there is a clear use case and sufficient argumentation For this particular use case I’d like to send Apple Events to Adobe Illustrator and QuarkXPress. The application helps the user with some design tasks in their documents. The app requests the currently open documents and accesses document content to process used design elements. This is optional functionality that the user must explicitly enable in the app. I’m aware that the com.apple.security.scripting-targets entitlement is preferred. (Side question: are these always allowed or can they also be rejected for third party app scripting?) However, many third party applications don’t offer any scripting access groups in their definition, including Adobe Illustrator and QuarkXPress in this case. So before spending a lot of time implementing this feature I’d like to have some indication whether it is unlikely that sending Apple Events to third party apps will be allowed on the Mac App Store. Thanks for any insights!
0
0
12
1h
Siri spawns multiple processes that don't die
When asking Siri to run a shortcut, it will spawn two processes called BackgroundShortcutRunner that do not die when the shortcut is done running. If the Siri window is on screen when I speak to have the shortcut run it does not spawn those two processes. However if the Siri window is not on screen when I speak, the Siri window appears and spawns these two processes. The two processes do not terminate once the shortcut is done running. I now have over 200 these processes since rebooting three days ago to install 26.4. FB22015192
Replies
2
Boosts
1
Views
194
Activity
Feb ’26
SiriKit: INPlayMediaIntent with a targeted speaker
I've got a streaming Radio app that loads an HLS stream into an AVAudioPlayer. I've set up an Intents extension that notifies SiriKit that my app must handle the INPlayMediaIntent in app, and, I'm able to successfully initiate the stream playing from my phone using the string "Play ". My intent handler in app looks like this: completionHandler(INPlayMediaIntentResponse(code: .success, userActivity: nil)) DispatchQueue.main.async { AudioPlayerService.shared.play() } The Audio Player service, in its init, does the following: try AVAudioSession.sharedInstance().setCategory( .playback, mode: .default, policy: .longFormAudio ) Additionally, in my Info.plist, I have the AirPlay optimization policy set to Long Form Audio. Having said all that, when I try to route my app to play "on a given HomePod speaker" ("play on ") the speaker routing instructions are never followed. I've looked and not been able to find where I might be able to instruct my app to follow the correct path here. I was assuming I could not trigger this behavior manually, as I believe I don't really have any control over AirPlay routing. Is there any guidance for working with SiriKit to do the right thing with regards to audio routing?
Replies
0
Boosts
0
Views
264
Activity
Feb ’26
App Shortcut parameter title in Spotlight does not update after updateAppShortcutParameters()
We use AppShortcutsProvider with a parameterized App Shortcut. One of the entities has a dynamic display title (e.g. "Everyone is searching: {keyword}") that comes from UserDefaults and is returned in EntityQuery.suggestedEntities() and entities(for:). When we change the keyword and call updateAppShortcutParameters(), the Shortcuts app updates and shows the new title. In Spotlight (Siri Suggestions), the displayed title stays on the old value (e.g. still shows "Everyone is searching: 456" after we switched to "123"). On tap, the shortcut runs with the new value (123), so the execution is correct; only the displayed title in Spotlight is stale. Question: Is this expected? Is there any API or recommended approach to invalidate or refresh the Spotlight suggestion so the displayed title matches the current parameter, or should we avoid dynamic titles for the first suggestion for better UX?
Replies
0
Boosts
0
Views
287
Activity
Feb ’26
Numbers Extension in Shortcuts
I am building an automation using Shortcuts. The shortcut reads text from my Notes, sends it to Apple Intelligence, converts the result into dictionary values, and then saves those values into a Numbers sheet by adding rows through a form. The problem is that when the automation processes multiple lines and adds multiple rows, the Numbers app opens every time a row is added. I would like this process to run automatically at a scheduled time without opening the Numbers app repeatedly on my iPhone. Is there a way to update the Numbers sheet in the background without launching the Numbers app? Please let me know if there is a solution.
Replies
1
Boosts
0
Views
157
Activity
Mar ’26
Wallet Automation on Apple Watch
I am trying to create an automation that will anable to add transactions to my app and it’s using a shared shortcut and a quick automation on the user end. it works great on the iPhone but i couldn’t find any way to make it work on my Apple Watch… any help with that?
Replies
0
Boosts
0
Views
204
Activity
Mar ’26
Can I use AppIntent with tvOS?
The AppIntent feature is available on tvOS since OS 16. https://developer.apple.com/documentation/appintents I tried a real basic integration where I just want simply open a specific tab in my tabbar. But the perform action gets never called. Is it really possible already to use AppIntent on tvOS? Or is this feature still mostly targeted for mobile devices? Also, the documentaiton says so often something about shortcuts app and features, that are not available on tvOS, that I started doubting that the AppIntent is really usable on tvOS. If AppIntents are available and usable for tvOS, what could be wrong, so that I do not see the expected results?
Replies
0
Boosts
0
Views
111
Activity
1w
AppEntity / EntityQuery returns multiple results but Shortcuts only displays a single item on newest iOS 26.4
We are observing a regression in iOS 26.4 related to AppIntents, specifically AppEntity + EntityQuery. When using a single AppIntent with a parameter backed by AppEntity and EntityQuery, the query correctly returns multiple entities (e.g. ~50 items). However, in the Shortcuts app UI, only a single item is displayed. This behavior differs from iOS 26.3 and earlier, where all returned entities are correctly displayed in the selection list. This issue significantly impacts dynamic configuration use cases where AppEntity is used to represent server-driven or runtime-generated options.(The screenshots below illustrate the difference in shortcut presentation between iOS 26.4 and earlier versions.)
Replies
1
Boosts
2
Views
123
Activity
3d
Siri Shortcuts Not Recognized on HomePod mini (audioOS 26.4) – Delegates to Built-in Responses Instead
Bug Report Environment 4× HomePod mini, audioOS 26.4 (23L243) iPhone, iPad, Mac – all running latest OS versions (iOS/iPadOS/macOS 26) iCloud account active, Shortcuts sync enabled on all devices Summary Siri no longer executes custom Shortcuts on any HomePod mini. Instead, the HomePod responds with built-in Siri answers or refers to the internet, as if no custom Shortcuts were registered. The same Shortcuts work correctly via Siri on iPhone, iPad, and Mac. Reproducible Test Case Created a new Shortcut named "Lemon Blue Seven" from scratch – no resemblance to any built-in Siri command, single action: spoken text output. Result: Mac: recognized and executed correctly via Siri iPhone / iPad: recognized and executed correctly via Siri (after re-registration, see below) All 4 HomePod mini: not recognized – Siri responds as if the Shortcut does not exist Steps to Reproduce Create a new Shortcut with a unique name and a single spoken output action Ensure iCloud Shortcuts sync is active on all devices Invoke via Siri on HomePod mini: „Run [Shortcut name]" HomePod responds with a built-in Siri answer instead of executing the Shortcut Additional Observations The issue appeared without any user-initiated changes to the setup Deleting all Shortcuts and re-importing them manually caused Siri registration to also break on iPhone and iPad; this was resolved by disabling iCloud Shortcuts sync, restarting the devices, and re-enabling sync The HomePod issue persisted through this fix – suggesting the HomePod's Intent delegation is broken independently of the hub device's registration state When a Shortcut name resembles a built-in command (e.g. „What time is it?"), the HomePod executes the built-in command instead – confirming it does not consult the user's Shortcut registry at all Troubleshooting Already Performed Multiple HomePod restarts Full factory reset and re-setup of HomePod (multiple times, also tested with only one HomePod active) Voice recognition re-trained Personal Requests disabled and re-enabled iCloud Shortcuts sync disabled on all devices, devices restarted, sync re-enabled sequentially All Shortcuts deleted and manually re-imported Home Hub verified: Bathroom HomePod registered as Home Hub, status „Connected" Tested with a separate Home setup Contacted Apple Support – no resolution provided Expected Behavior Siri on HomePod mini recognizes and executes user-defined Shortcuts by name, as it did prior to this issue and as it continues to do on iPhone, iPad, and Mac. Actual Behavior Siri on HomePod mini ignores user-defined Shortcuts entirely and falls back to built-in responses.
Replies
0
Boosts
0
Views
72
Activity
1w
Bug: Finder/AppleScript interaction
I have created a simple AppleScript that makes a folder named with today’s date. For many years, it has worked fine except: If I run the script (from a script app in the menu bar), then dump files into the folder, then change the colored “Tag” on the folder, I get a Finder error - An unexpected error occurred (error code -8076) - and I have to force-quit the Finder to complete the color tagging. If it change the tag before dumping the files, no error occurs. (Please hold the “Doctor, it hurts when I do this …” jokes.) This error has persisted through many macOS major iterations, including Tahoe 26.4.1. Prolly a Finder bug, but not sure. Here’s the source, for anyone interested. set dateStr to getDate() --display dialog dateStr tell application "Finder" activate try --set thisFolder to (the target of the front window) as alias set thisFolder to (the target of the front window) as string make new folder at thisFolder with properties {name:dateStr as string} on error errMsg display dialog "ERROR: " & errMsg end try end tell on getDate() set theDate to current date set theYear to year of theDate as string set theNewYear to third character of theYear & fourth character of theYear set theMonth to month of theDate as number as string if length of theMonth = 1 then set theMonth to "0" & theMonth as string end if set theDay to day of theDate as string if length of theDay = 1 then set theDay to "0" & theDay as string end if return theNewYear & " " & theMonth & " " & theDay as string end getDate
Replies
3
Boosts
0
Views
91
Activity
4d
Shortcuts: Can not access submenu of inserted variables inside of newly created dictionaries on mac
While I was creating a shortcut using the dictionary function I encountered a bug. When creating a new dictionary to store the date and some other stuff I set a value to the current date variable. I went to change the date format to one I preferred I was unable to access the submenu to do so. To figure out what was going on I did some testing and here is what I found: You can't access the submenu of any inserted variable This only happens in newly created dictionaries You can be fix the dictionary by simply closing and opening the shortcut This bug does not happen on Iphone How to make this bug happen: Open any shortcut Create a new dictionary Add a variable in the value field You can no longer access the sub menu to edit the variable.
Replies
1
Boosts
0
Views
50
Activity
4d
Mac App Store review policy for Apple Event temporary exception entitlements
I’m looking for some advice regarding the usage of temporary exception entitlements in Mac App Store apps. Specifically the Apple Event Temporary Exception to communicate with other third party applications (not first-party macOS system apps): The Best Practices for Submitting Scriptable and AppleScript Apps to the Mac App Store section is a bit vague (how to 'request' a temporary entitlement?) and I couldn't find it mentioned in the Review Guidelines. Before designing, implementing and testing functionality based on the Apple Event Temporary Exception I’d like to know if these entitlements would: A. Always be rejected on the Mac App Store B. Only accepted in highly specific use cases C. Accepted if there is a clear use case and sufficient argumentation For this particular use case I’d like to send Apple Events to Adobe Illustrator and QuarkXPress. The application helps the user with some design tasks in their documents. The app requests the currently open documents and accesses document content to process used design elements. This is optional functionality that the user must explicitly enable in the app. I’m aware that the com.apple.security.scripting-targets entitlement is preferred. (Side question: are these always allowed or can they also be rejected for third party app scripting?) However, many third party applications don’t offer any scripting access groups in their definition, including Adobe Illustrator and QuarkXPress in this case. So before spending a lot of time implementing this feature I’d like to have some indication whether it is unlikely that sending Apple Events to third party apps will be allowed on the Mac App Store. Thanks for any insights!
Replies
0
Boosts
0
Views
12
Activity
1h