Setting up gesture macros on iOS using macOS for mobile games

4 min readApr 26, 2021


Have you ever played a mobile game on iOS where you need to keep doing the same gestures over and over again (like tap a bunch of times in sequence) and wish there was a way to setup some sort of shortcut or do it automatically? Well you’re in luck! I’m going to show you exactly how to do that.

More commonly known as “auto-tapping” or macros, this feature is not new in iOS but it’s not super well known. Also it’s severely limited compared to what’s available in the Android world but with the help of a relatively new tool that allows you to use macOS to control your iOS device, we can do some interesting things with it.

Today I will just walk you through how to bind a key to a sequence of taps. In the future I will be providing some more advanced tutorials such as how to automatically repeat gestures so you can keep farming all day long to your heart’s content.

For my setup I use an app called KeyPad on macOS which basically acts as a Bluetooth keyboard/mouse for your iOS device. It also provides shortcuts to iOS controls such as home button, brightness/volume controls etc.

First download the app and pair it with your device by following instructions from the official site. After you’ve successfully paired it, you will see your device under preferences.

Now we’ll setup Switch Control on the iOS device so that we can control it using KeyPad. Go to Settings > Accessibility > Switch Control > Switches > Add New Switch… >External. Now on macOS open the KeyPad window which is connected to your iOS device and hit a key, let’s say “A”. When prompted for a name for the switch type “A” and tap “Save”, after that tap on “Select Item” under the “Actions” menu.

Congratulations! You have successfully setup your first switch (key bind) for your iOS device using KeyPad. Now that we have a switch, we’ll need to setup what we want to do on the iOS device when we press the key.

In this specific example we’ll use a game which I’m currently playing called Octopath Traveler: Conquerors of the Continent by Square Enix. The game doesn’t have any auto-battle function so you’ll need to manually fight each battle which is tedious when you are trying to farm mobs. When your party is high enough level you can basically just auto-battle by swapping front-line with back-line, boost, then attack — rinse & repeat. So we’ll map the keypress “A” to tap the buttons to swap, boost and attack to save us a few taps.

First you’ll need to physically mark the areas where you’ll be tapping on the screen (or otherwise remember exactly where to press) because the interface for setting up custom gestures won’t be overlaid on top of the game screen. So after you know exactly where to press, go to Settings > Accessibility > Switch Control > Recipes > Create New Recipe… on your iOS device. Name the recipe and assign the previously configured switch “A” as the switch. Then you’d want to select “Custom Gesture” and tap the exact locations of the three buttons in sequence then hit “Save”.

Now we’re ready to put everything together. Go back to “Recipes” under “Switch Control” and under “Launch Recipe” select the recipe we just created. Start Switch Control by triple-tapping on the home button, then when you’re in battle hit “A” on KeyPad and the custom gesture you pre-programmed should execute. While this on its own doesn’t really do much, this sets you up with the basics on how to automate taps using Switch Control. When you want to stop using Switch Control you can turn it off by triple-tapping the home button.

You can actually setup as many switches as you’d like so you can bind different keys to do different things (like controlling movements via swipes). The possibilities are endless — you are only limited by the duration of the custom gestures.

In the next tutorial I will show you how to setup auto-farming by using another app on macOS in conjunction with KeyPad to run macros on iOS continuously. It would look something like this video except you don’t actually need to tap the screen repeatedly.

The reason I use the KeyPad app as an example is to prepare for automation in the next tutorial. You can also use any other switch (like a real Bluetooth keyboard) but you won’t be able to automate it unless you setup some sort of physical contraption to continuously hit the keyboard :-) In theory you can also use other apps on other OSes as long as they can also act as a Bluetooth peripheral on your iOS device, so please feel free to leave links to other apps that work for you in the comments.




Want to help build an Open Source Android Emulator (Win/Mac/Linux)? Join the AndroidEmu Discord and let's talk!