<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Duchan</title>
    <description>The latest articles on DEV Community by Duchan (@joduchan).</description>
    <link>https://dev.to/joduchan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3944002%2F0ff27416-cd10-41eb-b4fa-31490e25b7cc.png</url>
      <title>DEV Community: Duchan</title>
      <link>https://dev.to/joduchan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joduchan"/>
    <language>en</language>
    <item>
      <title>We built a self-hosted Appetize alternative — no cloud uploads, no monthly fees, WDA-free iOS touch</title>
      <dc:creator>Duchan</dc:creator>
      <pubDate>Thu, 21 May 2026 14:56:32 +0000</pubDate>
      <link>https://dev.to/joduchan/we-built-a-self-hosted-appetize-alternative-no-cloud-uploads-no-monthly-fees-wda-free-ios-touch-4e2e</link>
      <guid>https://dev.to/joduchan/we-built-a-self-hosted-appetize-alternative-no-cloud-uploads-no-monthly-fees-wda-free-ios-touch-4e2e</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;tapflow is an open-source, self-hosted tool that lets QA teams interact with iOS simulators and Android emulators directly from the browser.&lt;/p&gt;

&lt;p&gt;It works similarly to Appetize, but everything runs on your own Macs and your app binaries never leave your infrastructure.&lt;/p&gt;

&lt;p&gt;Getting started takes two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; tapflow
tapflow start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why we built it
&lt;/h2&gt;

&lt;p&gt;Once our team started involving QA engineers, things became messy.&lt;/p&gt;

&lt;p&gt;Developers could run simulators locally on their Macs, but QA either had to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sit next to a developer,&lt;/li&gt;
&lt;li&gt;borrow a Mac,&lt;/li&gt;
&lt;li&gt;or constantly ask someone to screen-share.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We tried Appetize. It worked well, but eventually two things started bothering us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the monthly bill (~$200+)&lt;/li&gt;
&lt;li&gt;uploading app binaries to external servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;BrowserStack was even more expensive.&lt;/p&gt;

&lt;p&gt;At some point we started asking ourselves:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If simulators are already running on our Macs, why can't we just access them from the browser?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So we built tapflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Browser (QA team)  ←─ WebSocket ─→  Relay Server  ←─ WebSocket (outbound) ─→  Mac Agent
                                  (Linux / Mac)                           (iOS · Android)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are three core components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mac Agent
&lt;/h3&gt;

&lt;p&gt;Runs on a Mac.&lt;/p&gt;

&lt;p&gt;It captures simulator frames and forwards input events (touch, swipe, keyboard, etc).&lt;/p&gt;

&lt;p&gt;The agent establishes an outbound WebSocket connection to the relay server, so no firewall or NAT configuration is required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relay Server
&lt;/h3&gt;

&lt;p&gt;Built with Node.js + SQLite.&lt;/p&gt;

&lt;p&gt;It relays messages between browsers and agents, and also serves the dashboard SPA from the same port.&lt;/p&gt;

&lt;p&gt;The relay can run on Linux or macOS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dashboard
&lt;/h3&gt;

&lt;p&gt;A React 19 SPA.&lt;/p&gt;

&lt;p&gt;This is the only thing QA teams interact with.&lt;/p&gt;

&lt;p&gt;No Xcode. No Android Studio. No simulator setup.&lt;/p&gt;

&lt;p&gt;Just a browser.&lt;/p&gt;




&lt;h2&gt;
  
  
  The technically interesting parts
&lt;/h2&gt;

&lt;p&gt;iOS touch input — without WebDriverAgent&lt;/p&gt;

&lt;p&gt;WebDriverAgent tends to break whenever Xcode updates.&lt;/p&gt;

&lt;p&gt;It also requires provisioning profiles and only works properly while the app is running.&lt;/p&gt;

&lt;p&gt;We decided to take a different route.&lt;/p&gt;

&lt;p&gt;Instead of WDA, we load &lt;code&gt;CoreSimulator.framework&lt;/code&gt; dynamically using &lt;code&gt;dlopen&lt;/code&gt;, then directly call &lt;code&gt;SimDeviceLegacyHIDClient&lt;/code&gt; and &lt;code&gt;IndigoHID&lt;/code&gt; from a Swift binary (&lt;code&gt;touch-helper&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;That lets us inject HID events directly into the simulator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// touch-helper — inject HID events directly into the simulator &lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SimDeviceLegacyHIDClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;device&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;device&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;IndigoHIDEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;touch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;phase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;began&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This removes the dependency hell around WDA and works independently of the app lifecycle.&lt;/p&gt;




&lt;h2&gt;
  
  
  iOS streaming — SimulatorKit IOSurface
&lt;/h2&gt;

&lt;p&gt;The screenshot APIs exposed through &lt;code&gt;xcrun simctl&lt;/code&gt; had too much latency for real-time interaction.&lt;/p&gt;

&lt;p&gt;Instead, we access &lt;code&gt;IOSurface&lt;/code&gt; directly through SimulatorKit and pull frames straight from the GPU surface.&lt;/p&gt;

&lt;p&gt;Frames are JPEG-encoded on the Mac and streamed over WebSocket, which gives us roughly ~30fps.&lt;/p&gt;




&lt;h2&gt;
  
  
  Android — scrcpy H.264 → WebGL
&lt;/h2&gt;

&lt;p&gt;Android turned out to be much cleaner thanks to scrcpy.&lt;/p&gt;

&lt;p&gt;We receive the H.264 Annex B stream from scrcpy over a local TCP socket, relay it through WebSocket, then decode and render it in the browser using WebGL2.&lt;/p&gt;

&lt;p&gt;scrcpy server (emulator)&lt;br&gt;
    → TCP socket&lt;br&gt;
    → Agent&lt;br&gt;
    → WebSocket&lt;br&gt;
    → Browser&lt;br&gt;
    → WebGL2&lt;/p&gt;


&lt;h2&gt;
  
  
  Android pinch gestures — scrcpy multi-touch protocol
&lt;/h2&gt;

&lt;p&gt;scrcpy's &lt;code&gt;INJECT_TOUCH_EVENT&lt;/code&gt; supports multiple pointer IDs.&lt;/p&gt;

&lt;p&gt;Pinch gestures are implemented by sending two simultaneous touch events with different pointer IDs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ScrcpyControl — multi-touch injection&lt;/span&gt;
&lt;span class="nf"&gt;pinchStart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;touchDown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;touchDown&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What currently works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;iOS simulator streaming + touch/swipe/pinch/software keyboard&lt;/li&gt;
&lt;li&gt;Android emulator streaming + touch/swipe/pinch/hardware buttons&lt;/li&gt;
&lt;li&gt;App Center — &lt;code&gt;.app.zip&lt;/code&gt; / &lt;code&gt;.apk&lt;/code&gt; uploads with REST API + PAT support&lt;/li&gt;
&lt;li&gt;Build workflow management: Backlog / In Progress / Done / Rejected&lt;/li&gt;
&lt;li&gt;QA session recording (72h retention)&lt;/li&gt;
&lt;li&gt;Team management — invitations and role-based access&lt;/li&gt;
&lt;li&gt;Mac resource monitoring — CPU / RAM time-series charts&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; tapflow

tapflow start
&lt;span class="c"&gt;# → http://localhost:4000&lt;/span&gt;

tapflow init

For team deployments, the relay and agents can be separated.

&lt;span class="c"&gt;# Relay server (Linux/macOS)&lt;/span&gt;
&lt;span class="nv"&gt;JWT_SECRET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;openssl rand &lt;span class="nt"&gt;-hex&lt;/span&gt; 32&lt;span class="si"&gt;)&lt;/span&gt; tapflow relay start

&lt;span class="c"&gt;# Mac agents&lt;/span&gt;
tapflow agent start &lt;span class="nt"&gt;--relay&lt;/span&gt; wss://your-relay-url

The relay server itself can run on something as small as a ~&lt;span class="nv"&gt;$5&lt;/span&gt;/month Fly.io instance.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;macOS is still required for iOS simulators (Apple limitation)&lt;/li&gt;
&lt;li&gt;One Mac typically handles ~2–4 simulators depending on RAM&lt;/li&gt;
&lt;li&gt;Still v0.x — breaking changes may happen before v1.0&lt;/li&gt;
&lt;li&gt;WebSocket backpressure handling is not implemented yet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're currently exploring WebRTC as a future transport layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Contributions are welcome
&lt;/h2&gt;

&lt;p&gt;tapflow is fully MIT licensed.&lt;/p&gt;

&lt;p&gt;We're especially interested in contributions from people familiar with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;iOS Private APIs / CoreSimulator&lt;/li&gt;
&lt;li&gt;scrcpy internals&lt;/li&gt;
&lt;li&gt;WebRTC infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/jo-duchan/tapflow" rel="noopener noreferrer"&gt;https://github.com/jo-duchan/tapflow&lt;/a&gt;&lt;br&gt;
📖 Docs: &lt;a href="https://www.tapflow.dev" rel="noopener noreferrer"&gt;https://www.tapflow.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ios</category>
      <category>android</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
