iPhone: a player, a remote and a manager
Drafted 2026-10-03. Agreed so far: an iPhone app with three roles, the manager as a client of the server (as the Macs are), and the player built first. The rest is proposed and marked Open.
The three roles #
- Player. Watch the station on the phone: the same channels, tuned the same way. Built first.
- Remote. Drive an Apple TV from the phone (channel, guide, volume).
- Manager. Edit the station from the phone, as a client of the server.
Decisions #
- One iOS target, not a separate app.
RetroTV-iOSinproject.yml, built withPhoneUI,StationUI, andStationCorefromPackages/Package.swift(with a thin@mainshell inSources/iOS/PhoneApp.swift). - The manager is a client. It pairs with Antenna Tower by code or invite
and uses the admin API (api/README.md; historical design in
history/remote-management.md):
AdminClientandRemoteLinklive in shared targets (RelayAdminandStationCore). The iPhone runs no jobs and uses no iCloud. - Settings panes first, commands later. Channels, groups and the Server
pane are plain synced keys and need nothing new on the server. Anything the
Manager does with its own code (sports rescan, the review queue, VOD search,
stream tests, finding feeds, the audit) becomes an admin
commands/<name>endpoint, added in the order they're wanted. The MCP tools show where each one's logic lives. - The remote talks straight to the TV (decided 2026-10-03, replacing the
earlier "through the server"): the TV app advertises
_retrotv-control._tcpover Bonjour while it's on screen, as it already does for diagnostics, and the phone sends it keys with the household token. No server in the path, and it works with several TVs. The TV must have the app open: waking a sleeping Apple TV is a separate question. - The player is phone-native (decided 2026-10-03): a channel list and guide built for touch and portrait, around the same channel views the TV uses, not the TV's station UI letterboxed.
Open #
- Waking a sleeping TV. The listener only runs while the app is on screen. HDMI-CEC or Wake-on-LAN would be separate.
- Away from home. The admin API is plain HTTP. Tailscale works (an address typed in); nothing else here is encrypted.
Plan #
1. Player #
- Add the iOS platform to the packages and a
RetroTV-iOStarget (iPhone only,TARGETED_DEVICE_FAMILY: "1", deployment 17.0). VLCKit already ships an iOS build. - Get
Packages/Sources/StationUIcompiling for iOS. Expect the work in the#if os(tvOS)and#if os(macOS)branches (17 and 23 today) and the nine files importing UIKit or AppKit. - Input: touch for channel up/down and the guide, in place of the Siri Remote's
onMoveCommandand focus handling inRootView. - Phone behavior: safe areas, orientation, background audio, Picture in Picture, and the AVPlayer and VLC paths in IPTV, Plex and On Demand.
- Reach Antenna Tower and synced settings as the TV does.
2. Manager (client) #
- Move the pairing, polling and sending code out of
Packages/Sources/ManagerUI/Remote(nowRemoteLinkinPackages/Sources/StationCore/Remote/RemoteLink.swift) so both the Mac and the phone use it. - Phone layouts for the channels, groups and Server panes.
- Admin commands for the Manager's actions, one at a time.
3. Remote #
- A control path on the server and a way for the TV to receive it (see Open).
- The phone UI: D-pad, channel number, guide, volume.
Risks #
- The App Store plan (a clean store tvOS build plus a personal full build) now covers a third platform.
SWIFT_STRICT_CONCURRENCYstays minimal, and the Swift 6.3addTaskmiscompile (see the TaskGroup note) applies on iOS too.
Built #
(Dated October 2026 implementation log; the iPhone views listed under Sources/iOS
later moved into Packages/Sources/PhoneUI/, Packages/RetroRelay became
Packages/Sources/{RelayKit,RelayAdmin,RemoteControl}/, Packages/StationUI/Sources/StationUI
became Packages/Sources/StationUI/, RemoteLink moved to
Packages/Sources/StationCore/Remote/RemoteLink.swift, InviteOpening moved to
Packages/Sources/StationUI/App/InviteOpening.swift, and iCloud sync was retired
in favor of Antenna Tower and R2.)
- 2026-10-03: the iOS target and a first player.
RetroTV-iOSbuilds fromStationUI(simulator and device); VLC on iOS isMobileVLCKit.PhoneUI(Sources/iOS/at the time) is the phone's own app:PhoneRootruns the station's lifecycle (onLaunch, the flavor and refresh timers), hostsStationViewscaled into a 16:9 box (full screen in landscape), with a swipe to change channel (sideways) or step through it (up and down), and a channel list under it that tunes on tap; a group's members open above the list (StationModel.watch(member:)). Audio sessions now cover iOS.just phoneruns it in the simulator. - 2026-10-03: the guide. The channel list is the guide: each row shows what's
on now with how far into it, and what's next, from
GuideStore; a search box finds a channel by number, name or show. Station channels with an all-day block show only their title. - 2026-10-03: the remote.
RemoteControl(inPackages/Sources/RemoteControl, tested):GET /v1/stateandPOST /v1/commandover plain HTTP,X-RetroTV-Tokenon every request (the relay's household token), 403 for anything with anOrigin. A command is a key ({"press":"up"}: up, down, left, right, select, back, playPause, mute), a number ({"number":12}) or a channel id ({"tune":"…"}). On the TV,ControlHostruns the server (tvOS and the Mac TV app) andStationModel.remotePressis the Siri Remote's logic in one place, whichRootViewuses too. The phone has Watch and Remote tabs: Retro (a '90s IR remote in the station's colors: a display, a keypad that dials after a moment or on Enter, keys that sink into their shadow) or Standard, chosen from the palette button. The Guide button tunes the TV from the phone's own guide. The Watch tab stops playing while the Remote tab is up. - 2026-10-03: the Manager, first slice.
RemoteLink(the Mac client) moved to shared code (Packages/Sources/StationCore/Remote/RemoteLink.swift), shared by the Manager and the phone; the Mac-only parts are fenced or handed in. The phone has a Manage tab: Server (pair with the code the server shows; link state; refresh events; stop managing), Channels (search; rename, renumber, buffer, remove; restore removed ones) and Groups (members, order, on or off the dial, add by search or by source, delete). Editing needs the server, paired and in touch, or deliberately without it ("Edit without the server" when it can't be reached).RemoteLink.start()runs before the station loads, as in the Manager. - Checked on a phone (2026-10-03):
just phone-install(signed) shows the lineup, plays streams, swipes and rotates as intended; the remote drives the Mac TV app. The Apple TV has the build installed too. - Not yet checked: video playback and touch on a real stream; the synced lineup on an unpaired simulator build; background audio and Picture in Picture.
- 2026-10-18: iPad. The same app runs on iPad (
TARGETED_DEVICE_FAMILY1,2, every orientation, so Split View works). In landscape with a regular width the guide sits beside the picture; a double tap on the picture hides it for full screen. Portrait and narrow Split View keep the phone layout.just testflightarchives it and uploads it to App Store Connect (theiosapp inrelease.toml, build numbers from the clock); it needs the App Store Connect key in the release item and the app's record in App Store Connect, neither set up yet. Landscape is not yet checked on an iPad. - 2026-10-19: the remote's keys on the phone's picture. On Demand (its
door, posters and player), the station menu, a group's guide and who's
watching need the Siri Remote's keys, which the phone had no way to press. A
key bar (
PhoneKeys: Menu, the arrows, Select, Play/Pause) sits under the picture while the channel wants them, or floats over it in full-screen landscape; it callsStationModel.remotePress, as the TV's remote does, so iOS shows the TV's hints (SELECT, MENU). Swipes on the picture are arrow keys through the same path, so they change channel only when nothing takes them. On Demand's Search opens the system keyboard as a sheet (OnDemandKeyboard, now on iOS too). Checked in the simulator up to Search; not yet on a phone with a real catalog or playing a title. - 2026-10-19: On Demand made for touch. On its channel the list under the
picture (or beside it on an iPad) is On Demand's own screen
(
PhoneOnDemand), not the key bar: a search field, the home rows as sideways-scrolling posters (a row's name opens the whole shelf), walls as a grid that fetches pages as you scroll, lists as lists. A tap gives the poster the highlight and opens it (OnDemandBrowser.tap), so the picture shows the same; a title's card is buttons, the first the big one; a long press offers Play. While a title plays it's a scrubber, back 10, play or pause, ahead 30 and Stop. The list button brings up the channels as a sheet. In full-screen landscape the picture takes the remote as touches: a tap is Select, a swipe is an arrow, a swipe in from the left edge is Back, a long press is Play/Pause. The key bar is left for the menu, a group's guide and who's watching. Not yet in the native screen: the filter drawer and the player's paused menu (subtitles, audio, speed); the picture still has them. - 2026-10-19: tapping in looks like iOS. The screen is a navigation stack
over the browser's levels: a folder pushes a page, and Back or a swipe from
the edge pops it (
OnDemandBrowser.pop(to:)). Search is the system search bar, with All, Movies, Series and 4K as its scopes. A title's card is a sheet like the TV app's (PhoneTitleSheet: poster, a white Play button, what it's about, the other actions as a list), put up byPhoneRootso it shows over full-screen landscape too, and the resume question is an action sheet. In full-screen landscape a drag steps once for every 45 points it goes, with a tick for each, and a fling adds up to six more; on a channel that doesn't take the arrows a drag is still one channel. - Bundle id:
tech.phin.retrotv, the same as the Apple TV and Mac apps, so all three are one App Store Connect record ("Rabbit Ears", iOS, tvOS and macOS) and one TestFlight app. It wastech.phin.retrotv.phoneuntil 2026-10-18, before any upload. - 2026-10-19: inviting someone from the phone. Manage › Invite Someone, for
a phone with a manager among its profiles: a name makes them a profile (not a
manager unless switched on), waits for it to reach Antenna Tower (so the
invite carries the key to its history), then asks the tower for an invite
for just that profile (
invitecommand) and shows its QR code, with Share for the link. Their phone opens it in Rabbit Ears as them (docs/settings-sync.md).
Phin Tech docs
Rabbit Ears Manager in the store →