Building All Square: Why iPhone Duo Changed My App Development Process

Building All Square: Why iPhone Duo Changed My App Development Process

Developing All Square with two iPhones running side-by-side fundamentally reshaped how I test, iterate, and ship mobile features. Instead of building a feature, deploying it, testing on one device, finding a bug, fixing it, and redeploying—a cycle that could take 20 to 30 minutes per iteration—I cut my feedback loop to seconds by keeping a production build on one phone and a development build on the other.

This dual-device setup exposed edge cases I would have missed: session conflicts when the same user logs in on two devices, real-time sync delays between clients, and UI inconsistencies that only appear when you compare screens directly. For a web developer building their first serious mobile app, this workflow became the difference between guessing at user experience and actually seeing it unfold in real time.

Why does testing on two devices matter for mobile development?

Testing on two devices simultaneously reveals synchronization bugs, authentication conflicts, and state-management issues that never surface on a single phone. When building All Square's real-time game updates, I discovered that a player's move on device A wouldn't appear on device B for up to three seconds—a delay invisible when testing alone but frustrating in actual play. Running both devices let me measure that lag, trace it to a polling interval, and fix it before launch.

Single-device testing creates blind spots. You assume the backend is working because your one client updates correctly, but you miss race conditions, stale cache problems, and session token conflicts. According to Firebase's best practices documentation, real-time listeners can behave differently under network latency and concurrent writes—conditions you only catch when two clients interact with the same data simultaneously.

The iPhone Duo setup also forced me to think about offline states. With one phone in airplane mode and the other connected, I could test how All Square handles intermittent connectivity: does the offline device queue actions, does the online device show stale data, and what happens when the offline device reconnects? These scenarios are common in real-world use but easy to overlook when you test on a single, always-connected device.

What specific problems did the dual-device workflow solve?

The dual-device workflow caught three critical issues before users did: session invalidation when logging in on a second device, UI state drift between clients, and push notification conflicts. Each of these would have generated support tickets and negative reviews if they had reached production, but testing with two phones made them obvious and fixable during development.

Session invalidation was the first surprise. All Square uses token-based authentication, and I initially allowed unlimited concurrent sessions. When I logged in on the second iPhone, the first phone's token remained valid, creating a security risk and potential data conflicts. Testing side-by-side made this clear immediately: I could tap "Create Game" on both devices and watch the backend try to reconcile two simultaneous requests from the same user. The fix—invalidating older sessions when a new login occurs—took 30 minutes to implement but would have been hard to diagnose from user reports alone.

UI state drift happened because I relied on local state management without proper synchronization. When a player joined a game on device A, device B's lobby screen wouldn't update until I manually refreshed. With two phones on my desk, I saw this lag every time I tested a feature. I switched to a subscription model using Firestore's onSnapshot listeners, which push updates to all connected clients within milliseconds. Firestore's real-time listener documentation recommends this approach for collaborative apps, and testing on two devices proved why.

Push notification conflicts were subtler. All Square sends a notification when it's your turn in a game, but I didn't account for the case where you have the app open on one device and receive the notification on another. The first version sent notifications to all registered devices, creating duplicate alerts. Testing with two phones showed me that I needed to track which device was active and suppress notifications for the device currently viewing the game.

How do you set up a productive two-device testing environment?

Setting up a two-device workflow requires minimal hardware but deliberate organization: two phones, a multi-port charger, and a system for tracking which device runs which build. I use an iPhone 13 for production builds and an iPhone SE for development, both mounted on a dual phone stand so I can see both screens without picking them up. This physical arrangement matters—if you have to unlock and pick up a phone to check its state, you'll skip comparisons and miss bugs.

  1. Assign roles to each device: Keep one phone on the latest production build from the App Store and the other on your development build via Xcode or TestFlight. This separation ensures you always have a baseline to compare against. When a feature works on the dev phone but fails on the production phone, you know the issue is environmental or related to a recent change.
  2. Use different test accounts: Create two distinct user accounts—for All Square, I use "Player A" and "Player B"—so you can simulate multiplayer interactions. Trying to test with the same account on both devices creates authentication conflicts and doesn't reflect real-world usage. Separate accounts let you test invitations, turn-based gameplay, and social features as they'll actually behave.
  3. Keep both devices charged and unlocked: A dead or locked phone breaks your flow. I use a dual-port Anker charger and set both phones to a 5-minute auto-lock timeout. This seems trivial, but when you're iterating quickly, waiting for a phone to charge or repeatedly unlocking it adds friction that discourages thorough testing.
  4. Mirror or record sessions: For complex bugs, I use QuickTime's iPhone mirroring feature (on Mac) to record both screens simultaneously. This creates a side-by-side video that shows exactly how the two clients interact, which is invaluable when debugging race conditions or filing detailed bug reports.

What does this workflow cost in time and money?

The upfront cost is one additional iPhone and about two hours to configure your testing environment, but the time saved in debugging and the bugs caught before launch justify the investment. A used iPhone SE (2nd generation or later) runs $150 to $250 on refurbished markets and handles development builds without issue. If you already own an older iPhone, you can use it as your secondary device—All Square's development builds run fine on devices as old as the iPhone 8.

Time-wise, setting up the dual-device workflow took me about 90 minutes: installing development certificates on the second phone, creating test accounts, configuring Firestore security rules to allow the test accounts, and organizing my workspace. After that initial setup, the workflow adds zero overhead—in fact, it saves time. Before adopting this process, I spent 10 to 15 minutes per bug reproducing issues, guessing at causes, and deploying fixes. With two devices, I see the bug immediately, test the fix in real time, and confirm it works before committing code.

For a solo developer or small team, the return on investment is immediate. Statista reports that the average app rating in the App Store is 4.0 to 4.5 stars, and apps with ratings below 4.0 see significantly lower download rates. Catching synchronization bugs, session conflicts, and UI inconsistencies before users encounter them keeps your rating high and support burden low. One critical bug that generates 50 one-star reviews costs far more than a $200 refurbished iPhone.

How does this approach apply to web development?

The principle—testing with multiple simultaneous clients—applies equally to web development, though the mechanics differ. For All Square's web dashboard, I keep two browser windows open side-by-side, each logged in as a different user, to test real-time updates and collaborative features. This mirrors the dual-device workflow but uses browser tabs instead of phones.

Web developers can take this further with multi-browser testing. I use Chrome on one monitor and Safari on another to catch CSS inconsistencies and JavaScript compatibility issues. For responsive design, I resize browser windows to mobile widths rather than relying solely on Chrome DevTools' device emulation—real window resizing exposes layout bugs that emulation misses, like overflow issues and fixed-position elements that break at certain viewport sizes.

The lesson from the iPhone Duo workflow isn't device-specific; it's about observing your application from multiple perspectives simultaneously. Whether you're building a mobile app, a web dashboard, or a hybrid solution, testing with two clients running side-by-side exposes the real-world conditions your users will experience. For All Square, this meant the difference between shipping a polished multiplayer experience and launching with game-breaking synchronization bugs.

If you're building an app with real-time features, user sessions, or any form of multi-client interaction, set up a second testing device or browser window today. The investment is small, the setup is straightforward, and the bugs you'll catch before launch are worth far more than the cost. You can see the results of this workflow in All Square's smooth multiplayer experience—check out the features section to learn more about how I build reliable, real-time applications.