touchHLE: high-level emulator for iPhone OS apps

touchHLE is a high-level emulator for iPhone OS apps. It runs on modern desktop operating systems and Android, and is written in Rust.

touchHLE’s high-level emulation (HLE) approach differs from low-level emulation (LLE) in that it does not directly simulate the iPhone/iPod touch hardware. Instead of running iPhone OS inside emulation, touchHLE itself takes the place of iPhone OS and provides its own implementations of the system frameworks (Foundation, UIKit, OpenGL ES, OpenAL, etc). The only code the emulated CPU executes is the app binary and a handful of libraries.

The goal of this project is to run games from the early days of iOS:

Support for apps that aren’t games isn’t a priority: it’s more complex and less fun.

The touchHLE app compatibility database tracks which apps work in touchHLE. It is a crowdsourced effort to which anyone can contribute.

If you’re curious about the history and motivation behind the project, you might want to read the original announcement. For an introduction to some of the technical details, check out touchHLE in depth.

Important disclaimer

This project is not affiliated with or endorsed by Apple Inc in any way. iPhone, iOS, iPod, iPod touch and iPad are trademarks of Apple Inc in the United States and other countries.

Only use touchHLE to emulate software you have obtained legally.

Platform support

Input methods:

Development status

Real development started in December 2022. This is so far a single person’s full-time passion project; please consider helping me to keep doing this by donating! There are also a number of volunteers contributing in their free time. There’s only been a handful of releases so far and no promises can be made about the future. Please be patient.

In general, the supported functionality is defined by the supported apps: most contributors are interested in getting a particular game working, and contribute support for whichever missing features are needed for that game. Consequently, the completeness varies a lot between APIs, e.g. UIKit is easily the most hacky and incomplete of the large frameworks that have been implemented, because most games don’t use very much of its functionality, whereas the OpenGL ES and OpenAL implementations are probably complete enough to cover a large number of early apps, because games make heavy use of these.

Usage

First obtain touchHLE, either a binary release or by building it yourself (see the next section).

You’ll then need an app that you can run. The app compatibility database is a good guide for which versions of which apps are known to work, but bear in mind that it may contain outdated or inaccurate information. Note that the app binary must be decrypted to be usable.

There’s a few ways you can run an app in touchHLE.

Special Android notes

Windows, Mac and Linux users can skip this section.

On Android, only the graphical user interface (app picker) is available. Therefore, you must put your “.ipa” files or “.app” bundles inside the “touchHLE_apps” directory. Note that you can only do that once you have run touchHLE at least once.

File management can be tricky on Android due to restrictions introduced by Google in newer Android versions. One of these methods may work:

Graphical user interface

touchHLE has a built-in app picker. If you put your .ipa files and .app bundles in the touchHLE_apps directory, they will show up in the app picker when you run touchHLE.

To configure the options, you can edit the touchHLE_options.txt file. To get a list of options, look in the OPTIONS_HELP.txt file.

Command-line user interface

This section does not apply on Android.

You can see the command-line usage by passing the --help flag.

If you’re a Windows user and unfamiliar with the command line, these instructions may help you get started:

  1. Move the .ipa file or .app bundle to the same folder as touchHLE.exe.
  2. Hold the Shift key and right-click on the empty space in the folder window.
  3. Click “Open with PowerShell”.
  4. Type .\touchHLE.exe "YourAppNameHere.ipa" (or .app as appropriate) and press Enter. If you want to specify options, add a space after the app name (outside the quotes) and then type the options, separated by spaces.

Other stuff

Any data saved by the app (e.g. saved games) are stored in the touchHLE_sandbox folder.

If the emulator crashes almost immediately while running a known-working version of a game, please check whether you have any overlays turned on like the Steam overlay, Discord overlay, RivaTuner Statistics Server, etc. Sadly, as useful as these tools are, they work by injecting themselves into other apps or games and don’t always clean up after themselves, so they can break touchHLE… it’s not our fault. 😢 Currently only RivaTuner Statistics Server is known to be a problem. If you find another overlay that doesn’t work, please tell us about it.

Building and contributing

Please see the BUILDING.md, DEBUGGING.md and CONTRIBUTING.md files in the git repo.

License

touchHLE © 2023 hikari_no_yume and other contributors.

The source code of touchHLE itself (not its dependencies) is licensed under the Mozilla Public License, version 2.0.

Due to license compatibility concerns, binaries are under the GNU General Public License version 3 or later.

For a best effort listing of all licenses of dependencies, build touchHLE and pass the --copyright flag when running it, or click the “Copyright info” button in the app picker.

Please note that different licensing terms apply to the bundled dynamic libraries (in touchHLE_dylibs/) and fonts (in touchHLE_fonts/). Please consult the respective directories for more information.

Thanks

We stand on the shoulders of giants. Thank you to: