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
176
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
206
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
232
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
131
3w
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
74
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.)
0
1
61
4d
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
26
1d
Design question on opening files via Intents
Should there be separate intents to open each supported file type? Or a single intent, and my code sniffs out the format?
Replies
0
Boosts
0
Views
196
Activity
Feb ’26
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
176
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
206
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
232
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
131
Activity
3w
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
146
Activity
3w
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
74
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
0
Boosts
1
Views
61
Activity
4d
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
26
Activity
1d