---
title: "Mobile Tophatting at Shopify"
description: "Shopify requires developers to test features because it has no QA team, and its manual “tophatting” means running changes locally before merge. Mobile tophatting was slow because switching branches could invalidate Xcode/Android Studio caches, with builds taking up to 15 minutes. The new process skips compilation by exporting CI-built iOS and Android binaries into disposable PR environments, exposing them through the CI API and GitHub commit statuses, then extending the dev command to authenticate, find and filter artifacts, select an app and simulator or emulator, install it, and launch it. Developers can target pull requests, repositories, branches, or build URLs, while iOS apps are zipped .app folders and Android apps retain APK names. The team reports a positive response and lists local artifact caching, real-device support, and simpler commit or branch inputs as improvements."
---

# Mobile Tophatting at Shopify

[Shopify](https://yomu.fyi/company/shopify) · Pedro Piñera · Sep 11, 2018

**Type:** Tutorial

## Summary

Shopify requires developers to test features because it has no QA team, and its manual “tophatting” means running changes locally before merge. Mobile tophatting was slow because switching branches could invalidate Xcode/Android Studio caches, with builds taking up to 15 minutes. The new process skips compilation by exporting CI-built iOS and Android binaries into disposable PR environments, exposing them through the CI API and GitHub commit statuses, then extending the dev command to authenticate, find and filter artifacts, select an app and simulator or emulator, install it, and launch it. Developers can target pull requests, repositories, branches, or build URLs, while iOS apps are zipped .app folders and Android apps retain APK names. The team reports a positive response and lists local artifact caching, real-device support, and simpler commit or branch inputs as improvements.

## Context

Shopify’s developers perform manual checks called “tophatting” by running changes locally before merging them. For mobile projects, checking out another branch can invalidate caches and trigger lengthy Xcode or Android Studio builds, making the process particularly tedious.

## Approach / What changed

The implementation reuses mobile binaries already built by CI. Project pipelines export iOS apps as zipped .app folders and Android APKs with their existing names, while GitHub commit statuses expose available builds. The dev command authenticates with Buildkite and GitHub, finds and filters valid artifacts, lets the developer choose an app and simulator or emulator, then installs and launches the selected binary.

## Takeaways

- Mobile tophatting avoids local compilation by using application binaries produced by CI and stored in disposable environments for pull request builds.
- The dev command accepts pull request, repository, branch, and build URLs, and filters artifact lists to show only resources that can be tophatted.
- The process currently runs apps in iOS simulators or Android emulators; planned improvements include local artifact caching, real-device support, and simpler commit or branch selection.

## FAQ

### Why does the mobile tophatting process avoid rebuilding the app?

Branch changes can invalidate caches in Xcode and Android Studio, and builds can take up to 15 minutes. The process instead uses binaries that CI has already built and exported.

### What resources can the dev tophat command accept?

It accepts a pull request URL, repository URL, repository branch URL, or build URL. When given a GitHub URL, it uses commit statuses to locate the build and filters out invalid artifacts.

### Can developers tophat on physical devices?

The current process lists iOS simulators and Android emulators and installs the selected app there. Real-device support is a planned improvement; iOS builds would need a valid certificate for installation on testing devices.

**Tags:** [Android](https://yomu.fyi/topic/android), [CI/CD](https://yomu.fyi/topic/ci-cd), [iOS](https://yomu.fyi/topic/ios)

- Source: [Shopify](https://shopify.engineering/mobile-tophatting-at-shopify-1)
- Source URL: https://shopify.engineering/mobile-tophatting-at-shopify-1
- Ingested by Yomu: 2026-09-17T14:12:52.462Z

[Read original post](https://shopify.engineering/mobile-tophatting-at-shopify-1)
