I'm using the App Intents API to provide an automation through the iOS Shortcuts app. When my intent runs, I'd like to be able to decide if I want to open the app (bring it to the foreground) or not. I know openAppWhenRun
can be used to open the app, but its value cannot be modified.
I tried using openAppWhenRun
, but it does not have a setter. Therefore, I cannot dynamically update this variable to determine if the app should be opened in the foreground or not.