Skip to content
C.W.K.
Lesson 05 of 05 · published

One Universal App

~11 min · universal, iphone, ipad, lease, size-class

Level 0Spark
0 XP0/48 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Two Glasses, One Contract

Smolder on iPhone and iPad is one universal app, not two products with two contracts. Same gateways, same device permission, same daemon identity, same ember in the chrome. Size class changes how many sessions you can see, not what you are allowed to do in them. iPhone focuses one session. iPad may show two. Two apps would be two places to get the input contract wrong, two TestFlight trains, two pins, two ways for a hangup to mean kill on one glass and detach on the other.

Universal is not a marketing word here. It is a refusal to let iPad become "the real pocket terminal" while iPhone becomes a viewer with a looser brain. The working contract is continue-host-work on both: open a host session and type in it beside the Mac, open a shell or CLI through the host. An iPhone that cannot type because it is "only a viewer" is a second product. An iPad that can do something the iPhone cannot, because it is larger, is a second product too. Both fail the one-contract test.

Two Visible, One Keyboard Focus

An iPad can put two host sessions on screen. That is a projection luxury. Each pane keeps its own state — typing enabled, held, held by someone else, or observing — and exactly one of them has keyboard focus. The focused pane says Keyboard here; the other, on a device approved for control, says it can type but is not where your keys are going. Tapping the other pane moves keyboard focus; it does not take anything from anyone, because under the shared contract nothing is taken.

A hardware keyboard on iPad makes typing feel effortless, and that is exactly why focus has to be unmistakable. Keystrokes go to the one pane that shows Keyboard here — never into whichever pane the cursor last painted, never into both. A device approved only to read types nowhere at all, on either size of glass.

Size Class Never Mints Permission

Rotation, split view, Stage Manager — those change how many rectangles you can see. They do not grant input and they do not resize the host: the grid still follows whoever typed last. If a size-class callback ever changed a pane's permission or sent a size to the daemon, observation would have resized the contract, which is worse than resizing a PTY.

Delivery stays one binary through TestFlight. Track 7 will insist on that pipeline. This lesson insists on why: one contract cannot survive two apps that drift. The destination track's later milestones — checkpoints, direct SSH, keys — are still one app's milestones, not an iPad-only SSH client and an iPhone-only viewer. Mix those and you have taught a family that the pocket is two products. It is not. It is one fire, two sizes of glass, one owner of the keys when keys exist, and one clear keyboard focus today.

One universal app. Size class changes how many sessions you can see, not what you may do in them. iPhone shows one, iPad may show two, and exactly one pane has keyboard focus. Two apps would be two places to get the input contract wrong.

Code

Size class is visibility, not ownership·text
iPhone compact     ->  one session visible
iPad regular       ->  one or two sessions visible
both               ->  each pane keeps its own state (typing / held / observing)
both               ->  exactly ONE pane has keyboard focus ("Keyboard here")
both               ->  same gateways, same pin, same ember

# Hardware keyboard on iPad
  keystrokes         -> the pane that shows "Keyboard here"
  other visible pane -> not a target until you focus it
  read-only device   -> nowhere, on any glass

# Forbidden splits of the product
  "iPhone is viewer, iPad is terminal"
  "a size-class callback changes permission or sends a size"
  two bundle identities, two TestFlight trains, two pins

External links

Exercise

Draw iPhone (one session) and iPad (two sessions) side by side, both on a device approved for control. Mark, on each glass, which pane has keyboard focus and what each pane's state line would say. Then write what a hardware-keyboard character does on the iPad, and what it would do on a device approved only to read. If your answer is "it types into both" or "into whichever looked active," focus has already split.
Hint
Two visible panes, one keyboard focus. Permission comes from the device, never from the size of the glass.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.