As seen on the Shopify Engineering Blog!
Tophat is the best way to install and test any mobile application. Just add CI.
With Tophat, you can skip building branches locally. Tophat hosts a lightweight web server, allowing you to easily add Tophat links to your CI pipeline and launch apps right from GitHub.
Quick Launch allows you to add your favourite apps right in the Tophat menu. Need the latest build? Click on the icon and go! Tophat will download the latest version, update the icon, and launch it on your device.
Have lots of devices and only use a couple at a time? Easily pin them to the top of the devices list for quick access.
Customize Tophat to your needs with the Settings window. Adjust preferences, add apps to Quick Launch, or even specify custom tooling paths to make Tophat work for your environment.
There are a number of ways to interact with Tophat so that you can integrate it into your project with ease.
Tophat features a lightweight web server so that you can launch apps using CI artifacts. To handle builds that use separate artifacts for different device types, specify a virtual
URL that points to a simulator-only build, and a physical
URL that points to a device-only build:
http://localhost:29070/install/<ios|android>?virtual=https://url/to/virtual&physical=https://url/to/physical
Or, for universal builds that work on all device types, use the universal
query param:
http://localhost:29070/install/<ios|android>?universal=https://url/to/virtual
You can also specify arguments to pass to the application on launch using the launchArguments
query string. For example:
&launchArguments=one,two,three
On iOS, these arguments are retrievable using ProcessInfo
. On Android, these arguments are delivered to your appʼs main activity via intent argument extras in the TOPHAT_ARGUMENTS
key as an array of strings.
For applications that support custom URL schemes, use the tophat://
scheme to launch right into Tophat:
tophat://install/<ios|android>?universal=https://url/to/universal
URL schemes and handling via web server both use the same URL format.
Tophat can be integrated with various tools and projects using tophatctl
, Tophatʼs companion command line app. You can use tophatctl
to perform the following tasks:
- Manage Quick Launch apps. Pre-populate Tophat with your projectʼs apps in a
dev up
step. - Install apps. Install an app by URL or path.
For more details on how to use tophatctl
, run the following command after installing the Command Line Helper:
tophatctl --help
Tophat also adds file associations to *.ipa
, *.apk
, and *.zip
files so you can open artifacts from your device.
A signed universal binary of Tophat can be downloaded from the latest GitHub release. Click the button below to jump to it, download the .zip
file, and move Tophat to your Applications folder:
A full list of releases is available here.
Tophat will automatically check for updates and let you know if a new one is available. Youʼll be prompted to enable automatic update checks the second time you launch Tophat. Automatic updates can also be configured from Tophatʼs Settings window.
Tophat requires a few developer tools to be set up. On first launch, Tophat will guide you through making sure everything you need is ready to go.
Tophat requires macOS 14 or later.
- Xcode 15 or newer is required.
- All simulator versions are supported, but physical devices must be running iOS 17 or later.
Tophat works with Android Studio and Android toolchains with a working adb
and avdmanager
environment.
See the contribution guidelines for more information.