r/iOSProgramming • • 52m ago

Article Development Lessons: App for Duo

A lot of newer indie and solo developers, including vibecoders, probably want an app that works on the Duo but, due to cost, may not have one. So here are some lessons from developing ahead of the Duo launch, with no device in hand.

We started development of Millpond which is a side-project of a more intentionally health-domain app that we have currently in-development. There were some features and approaches that we could do in a water tracker that I wouldn't want to test in a more health-data/sensitive app.

So in late Summer, about 6 weeks before the iPhone Duo shipped we forked and dedicated some time to it. Given it was going to be cross-platform it is largely a common Expo core, with native elements for Apple services, widgets, watch and notifications. We had 2 app revisions prior to launch, 1 to check branding on Apple services (Location, Health) and 1 because Duo screenshots had black bars to fill the size due to errors in the beta version of xCode for Duo - but that was at build 340 and with several non-dev test flight users.

One of the reviews took over a week just pre-launch of Duo. And ended up withdrawing that ourselves and resubmitted and got through 2 days later. We missed the Duo launch due to the delay, but went live shortly afterwards.

Summary: We logged 19 layout mistakes by folding and unfolding the simulator. The worst: the main screen collapsed to zero height because of a single number. The code looked fine, which is why it took a while to find. AI coding tools often don't flag that kind of bug for the same reason.

The device

The folded outer display is 466 x 678 pt. Unfolded, the inner display is 951 x 669 landscape: about (but not exactly!) twice the width at the same height. Your app has to survive the switch mid-session, with the user watching.

Our lessons: what you'll see, and what to do (or tell your coding agent to do)

You'll seeBecausePaste this
The main screen is squashed or empty on the folded displayThe tab bar became a side pill, and its height now reads as the whole screen (678 pt). Your bottom padding is a screen tall"Never use the tab bar's height as padding."
A grid stays one column after folding backPercentage widths go stale on resize"No percentage widths on anything that resizes. Use fixed point values."
Sheets open full-height with most of it blankThey were sized for a tall phone. We had 508 pt of nothing"Sheets must fit their content on a 466 x 678 window."
Buttons are hard to hitThe tap area stuck out past the parent, and iOS ignores it there"Every tap target is at least 44 pt tall."
Cancel draws under the status barSafeAreaView inside a Modal reports zero insets"Read safe-area insets outside the Modal and pass them in."
The app runs in a box with bars around itIt was built with an old SDK"Build with the iOS 27.1 SDK or later."

Also tell it to size layouts from the current window size, never the phone model or orientation.

It's not just a wider screen

Stretching everything is the easy plan. We skipped it, because the second screen is a different job. Apple's rule is the same state and the same functions on both displays, with the inner one allowed to add one level of hierarchy. Same app, one more layer.

Then we asked who's holding it:

How it's heldWhat the person wantsWhat we did
Outer display turned sideways, in hand or a mountGlance, log a drink, leaveDisplay on top, tap targets in one row below
Same window, standing as a tent on a deskRead it from about 1 m for hours. A tap near the top tips it overSoftware can't tell this from the row above, so we designed for the harder one: the top half is look-only, with one number readable from across the desk
Unfolded, or half open in an LWatch the top, touch the bottomContent above the crease, controls below, so folding to the L moves nothing

We also drew an ambient tent mode (chrome fades after 20 s of stillness). It's behind a flag, off.

What that looked like per screen:

  • Pacing (Home). Collapsed behind a toggle on a compact window, open by default with room.
  • Drink buttons. Where they sit is a per-display setting, and only a folding phone sees both.
  • Logbook. Unfolded, it's one full-width list. Open an entry and the window splits at the hinge, list left and editor right. Close it and the list goes back to full width. We tried an always-on split and rejected it.
  • Insights. Folded, the pond hero is the top of the scrolling list. Unfolded, it gets its own pane on the left and the history scrolls on the right.
  • Settings. One column folded, two unfolded. Our first split was by card role, and the right column gave up halfway down, leaving about half the width empty. Now cards are placed by measured height, with Subscription pinned top-right.

All of it keys off window size: three layouts, no pose detection. The poses only decided what each layout is for.

The native tab bar is great for the Duo, and only the Duo

We used the native tab bar, with an icon on every tab. On the Duo the system moves it to a side pill on the outer display and in inner landscape. No code. Enjoy it while it lasts.

Then a regular iPhone went landscape. It keeps its bottom bar, and there isn't enough height left for a bar plus your content. Landscape on a regular iPhone is work you do yourself, if you want it at all.

First, we locked non-fold phones to portrait. We wanted to launch fast for the Duo, so a folding phone can rotate and others can't. Millpond is still in this state and probably will stay that way, because the use case is quick logging.

For user testing we built a custom rail anyway. When the window is wider than tall, we hide the native bar and draw our own where the Duo's pill sits. The Duo's shortest landscape window is 466 pt tall, so 450 pt is our cutoff. The rail sits behind the portrait lock, ready if we ever want it. We've only checked it on one simulator, in one landscape direction.

The trigger is window size, not model, so it should hold up on future phones.

Don't skip the regular iPhone

Building Duo-first makes it easy to forget the phone most of your users hold. Every visible change now gets a pass on a regular iPhone in portrait (about 400 pt wide, one column) as well as the Duo.

A turned regular iPhone and the turned Duo outer display land in the same short, wide layout. Design it once, and check it at large text.

The test that finds most of it

You don't need hardware to fold the phone. Xcode's simulator has fold and rotate buttons in its toolbar, with folded, half-open and unfolded states. There's no command-line switch, so a human presses them.

Fold, unfold and fold again, with a screenshot at each step (your tool can take those). The last screenshot should match the first. If it doesn't, you've found a bug. We ran a full audit before fixing anything: 42 screenshots, a scored critique, then 12 high-priority fixes in a day.

What the simulator can't do: drive Split View, or register automated taps on the side tab pill. Keep a list of what you haven't seen on hardware. Ours is longer than we'd like.

The app is Millpond Water Tracker, a small hydration tracker.

3 Upvotes

4 comments sorted by

•

u/busybags 22m ago

Hopefully people get a device before releasing for it! No need for more slop in the store.

Appreciate the write-up.
Also - your last picture looks super distorted.

•

u/MyAugur 18m ago

Apps don't pay like they used to and not everyone can drop $2k on a phone off the bat, so at least have it designed for Duo rather than the default stretched screen view that sucks. Evidenced by the stretched inline image that reddit put in and looks terrible here too!

•

u/distractedjas 7m ago

The iPhone Duo is such a small market share that my company decided not to do any special work for it for the time being. There are so many other things that will provide a larger impact. I’ve more or less done the same for my side projects. Any special effort for the duo is purely performative for the short term at least.

•

u/LKAndrew 2m ago

This is all pretty bad advice. You shouldn’t be measuring window sizes at all, you should be building responsive design and layout. Window sizes should be dynamic because your app can be completely resized to any size now, the Duo is not just inner and outer screens. There are many multitasking modes.