Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What applescript commands can be sent to iOS Simulator?

I know you can tell the iOS Simulator to quit with applescript. Can you tell it to go "home" from the current app? And then click on the app's icon to relaunch it? This would be useful for me for Application Tests that need to verify background tasks complete and numerous other cases.

like image 648
jpswain Avatar asked Oct 06 '22 14:10

jpswain


2 Answers

Any AppleScriptable app must export a scripting dictionary in order for AppleScript to know what its commands are. You can see any app's dictionary by opening the app in Script Editor.

Note that even if an app doesn't provide script commands for what you want, System UI Scripting or Automator can likely still be used to drive its UI. (For example, to choose the Home or Rotate commands in iOS Simulator's menu bar.)

There's also iOS-specific UI automation stuff you can do from the Instruments app that comes with Xcode.

like image 84
rickster Avatar answered Oct 12 '22 15:10

rickster


The iOS Simulator does not directly support AppleScript. It doesn't have a scripting dictionary. This means that the only real way to manipulate it in AppleScript is to use the UI commands that work for any application.

like image 43
Micah Hainline Avatar answered Oct 12 '22 14:10

Micah Hainline