Projects

Companion iOS app

Cadence iOS

A native iOS 26 camera teleprompter that hugs the lens, tracks speech on-device, adapts text contrast to the scene, and syncs scripts with Cadence on Mac.

Period
2026
Status
v1.2.0 (build 7) · TestFlight testing
Role
Creator / design / Swift engineering
Disciplines
iOS app · Swift · Local speech · Camera studio
1 · EYE LINE

Step away from your desk and the script hugs the iPhone lens. pauseSpeak faster or stop to improvise, and on-device speech tracking waits for you. smileIf you flub a line, swipe right to rewind one sentence and keep the take rolling.

4K · 25 · HEVC
00:04/ 00:22

Stepping away from the Mac

Cadence for Mac solved recording at a desk: draft a script in a clean library, or revise it from Cursor, Claude, or Gemini over Cadence’s local MCP server, then read it right underneath the MacBook camera notch.

The gap shows up as soon as you want to film standing up, outdoors, or on a better camera sensor than a laptop webcam. Most iPhone teleprompter apps make you copy scripts across by hand, put 4K or voice tracking behind a subscription, treat the camera like an afterthought, or leave white text unreadable against a bright sky.

So I built Cadence iOS inside the same Swift 6 repository as the Mac app. It reuses the same script parser, phonetic aligner, scroll physics, speech engines, and library sync (CadenceCore, CadenceMedia, CadenceSpeech, and CadenceSync), then wraps them around a full-bleed AVCaptureSession camera studio built for an iPhone.

Cadence iOS 1.2.0 (build 7): core studio specs

4K 60
Creator Pro capture1080p or 4K at 24/25/30/50/60 fps in HEVC or H.264, with 10-bit HDR and bounded 3-frame encoder backpressure.
0 MB
Ready offline out of the boxDefaults to Apple's built-in SpeechAnalyzer, with optional Parakeet EOU and Moonshine v2 downloads in Settings.
16×8
Smart Contrast gridLive Y-plane luminance sampling behind the text card with 0.62 / 0.44 hysteresis and zero flicker.
5-tier
Verification gateAutomated AVAssetWriter, spoken-WAV speech, live sync round-trip, and iOS Xcode unit + UI test suites.

Keeping your eyes near the lens

Eye drift is even easier to spot on a phone than on a laptop because the lens sits close to your face. Run text all the way across the display and your eyes visibly scan left and right on video.

By default, Cadence iOS narrows the teleprompter card (PrompterOverlayCard) to a 78% column centred right underneath the Dynamic Island or notch in portrait, with the active reading line tucked near the top at 14% height. Turn the phone to landscape and the card flips to hug whichever side holds the camera lens, while the shutter, camera switch, and controls drawer move into a vertical Pro Rail on the opposite side so your hand stays out of your sightline.

Once you press record, the viewfinder switches into Pure Lens mode. The card footer shrinks to a 3-point hairline progress bar, the utility chrome hides, and a thin crimson tally border glows around the bezel so you can tell you’re rolling without staring at controls. If you stumble on a line mid-take, you don’t have to stop the camera: swipe right across the script and it rewinds cleanly to the start of the previous sentence or # Section cue while you keep rolling.

Keeping text smooth and readable over live video

Pushing 60 to 120 Hz scroll updates through SwiftUI view invalidations burns battery and fights with 4K video encoding. Instead, PrompterScrollBridge pushes scroll offsets and active-word indices straight into a UIKit TextKit 1 canvas driven by CADisplayLink, and puts the display link to sleep at 0 Hz the moment you pause and the scroll settles.

Outdoor light turned out to be just as important as smooth scrolling. White text over a dark room looks great until you walk outside and hold a bright sky behind the card. SmartContrastPixelSampler (inside CadenceMedia) samples a 16×8 luminance grid directly from the camera CVPixelBuffer’s Y-plane, handling both 8-bit SDR and 10-bit HLG HDR with no GPU or Metal allocations, inside the exact region behind the script card. That reading feeds SmartContrastStateMachine, which uses dual-threshold hysteresis (0.62 to switch to dark charcoal ink, 0.44 to return to light ink) with two-sample confirmation so normal head movement never makes the text flicker. On busy or mid-grey backgrounds when manual opacity is set low, an adaptive protective scrim fades in to keep the line legible.

One audio pipeline for video and voice tracking

On iOS, running AVCaptureSession to record video and microphone audio alongside a separate AVAudioEngine tap for speech recognition tends to fight over the audio session, drop frames, or stall transcription. Cadence iOS avoids that with SharedCaptureAudioFeed: a single AVCaptureAudioDataOutput feeds both the video writer and a PCM bridge that normalises hardware samples into mono Float32 buffers for whichever on-device speech engine is active, while driving the five-band Goertzel volume beam and clipping indicator off the main thread.

Even with one capture graph, real-device testing turned up a tricky iOS 27 edge case. Switching audio routes mid-session, such as moving between 16 kHz AirPods Pro hands-free and the iPhone’s 48 kHz built-in mic, rebuilt the audio converter and reset sample timestamps, which made SpeechAnalyzer fail with backwards-timestamp errors (SFSpeechErrorDomain Code 2). In build 7, AnalyzerInputConversionBridge keeps one strictly monotonic output-frame counter across route switches, converter rebuilds, and fallback transitions so voice tracking stays locked without resetting.

Out of the box, Cadence iOS defaults to Apple On-Device Speech (SpeechAnalyzer, 0 MB download) so voice following works offline on first launch. Inside Studio Settings, you can download NVIDIA Parakeet Realtime EOU (~200 MB on the Apple Neural Engine, marked Recommended), Moonshine v2 Small (~100 MB CPU), or Moonshine v2 Tiny (~35 MB CPU) with one tap. The active engine picker only offers models that are actually installed on the device and falls back cleanly to Apple Speech if you delete a model later.

Camera studio & sync breakdown

iOS 26.0+ · iPhone · shared Swift 6 core with macOS Cadence
Prompter & eye line

Anchored directly under the lens

  • 78% narrow default column centred right beneath the Dynamic Island or notch in portrait
  • Automatic landscape flip: text hugs the camera edge while controls move to an opposite Pro Rail
  • Pure Lens recording mode: collapses footer into a 3 pt hairline progress bar with a crimson tally glow
  • Swipe right across the script to rewind cleanly to the start of the previous sentence without stopping the camera
Smart Contrast & speech

Legible video and route-safe tracking

  • Samples a 16×8 grid directly from the camera CVPixelBuffer Y-plane (8-bit SDR or 10-bit HLG HDR) in CadenceMedia
  • Dual-threshold hysteresis (0.62 to dark ink, 0.44 to light ink) with 2-sample confirmation and adaptive scrim
  • Defaults to zero-download Apple SpeechAnalyzer, with one-tap downloads for Parakeet Realtime EOU (ANE) and Moonshine v2
  • Single monotonic audio frame counter keeps SpeechAnalyzer stable across AirPods HFP (16 kHz) and built-in mic (48 kHz) switches
Camera & audio

Hardened on real iPhone hardware

  • CadenceMedia SampleBufferVideoRecorder validates AVAssetWriter output settings and caps in-flight 4K frames at 3
  • 25 fps and 50 fps presets alongside 24/30/60 fps to prevent 50 Hz indoor lighting flicker in Australia
  • Tap-to-focus, long-press AE/AF lock, manual EV bias (-2.0 to +2.0 EV), and manual Kelvin (2500–8500K) + tint
  • Lock-guarded startup avoids MainActor/sessionQueue deadlocks, paired with directional cardioid mic beamforming and clipping LED
Takes & reliability

Safe footage and end-to-end checks

  • Two-step Apple Photos save writes the video asset first (even under Add-Only permission), then links it into the Cadence album
  • Crash-safe PendingTakes recovery catches interrupted recordings on relaunch
  • Post-take review bar with one-tap AirDrop/Share and Delete & Retake from the top or current cue
  • 5-stage pre-release verification gate covers AVAssetWriter capture, spoken-WAV alignment, sync round-trips, and iOS UI flows

Two-way script sync with Cadence for Mac

Device-local prompter settings stay independent
Local Wi-Fi Sync (Bonjour)Works offline on any build with zero cloud account
_cadence-sync._tcp · 6-digit single-use pairing code

Discovers Cadence on your Mac over local Wi-Fi, pairs with a 2-minute code (rate-limited after 5 failed tries), and merges scripts, folders, and 30-day deletion tombstones deterministically.

iCloud CloudKit SyncTestFlight & provisioned Apple Developer builds
Private database · CadenceLibraryZone (CKServerChangeToken)

Incremental two-way sync across Wi-Fi and cellular, including scripts drafted via MCP on Mac. Verifies CloudKit entitlements upfront so unprovisioned builds stay safely offline.

What real-device testing changed in the camera pipeline

Because the point of filming on a phone is walking away with dependable footage, I moved the recording engine into its own cross-platform CadenceMedia module (SampleBufferVideoRecorder). It validates hardware-recommended video and audio dictionaries through AVAssetWriter.canApply(outputSettings:forMediaType:), keeps video buffers in native unrotated sensor space via AVCaptureDevice.RotationCoordinator (applying rotation in AVAssetWriterInput.transform rather than spending CPU rotating 4K pixels), and caps in-flight 4K frames at 3 so memory stays bounded under encoder load.

The four-tab Creator Controls Drawer (Prompter, Camera, Video, Audio) covers 1080p and 4K recording in .mov or .mp4, HEVC or H.264, 10-bit HDR where supported, Standard or Cinematic stabilisation, and 24, 25, 30, 50, or 60 fps, including 25 and 50 fps so indoor lighting in Australia doesn’t pick up 50 Hz flicker. You also get tap-to-focus, long-press AE/AF lock, manual exposure bias (-2.0 to +2.0 EV), manual Kelvin (2500–8500K) and tint white balance with presets, multi-cam 0.5× / 1× / 2× zoom stops, directional cardioid mic beamforming matched to the active lens, and volume-button or Bluetooth shutter triggers.

Putting early builds onto a real iPhone turned up bugs that simulator work didn’t catch. Early TestFlight builds could deadlock between MainActor and sessionQueue while attaching the preview layer on startup; mounting CameraPreviewView up front (Apple’s AVCam pattern) and guarding session transitions with an OSAllocatedUnfairLock (sessionTransitioningLock) cleared that race completely.

I also had to cut a feature I’d initially built. Early builds attached a non-realtime QuickTime chapter metadata track to .mov recordings for # Section cues, which sounded useful for editing in Final Cut or Resolve. In practice, mixing a non-realtime metadata track into a live AVAssetWriter session risks FigFormatWriter interleaving stalls and Apple Photos import rejections, so I took chapter tracks back out and kept the writer strictly video plus audio.

Saving to Apple Photos needed a similar rethink. PhotosLibrarySaver now writes the finished video asset into Apple Photos first (which works even if you only grant Add-Only permission), then links it into the Cadence album as a best-effort second step so album creation can never fail a take. Interrupted recordings stay recoverable in PendingTakes on relaunch, and the post-take review bar lets you AirDrop, keep, or delete and retake from the top or current cue.

Syncing with Cadence on Mac

The iOS workspace mirrors the Mac app’s Notes-style layout: folders, pinned scripts, search, .md, .txt, and .rtf import, and a cursor-aware keyboard bar for inserting # Section, [pause], [smile], [breathe], and **bold** cues.

Syncing between Mac and iPhone runs through the shared CadenceSync module introduced in Cadence 1.2.0, using deterministic Last-Write-Wins merges (LibrarySyncMerger) with 30-day permanent-delete tombstones while leaving device-local prompter settings alone. Local Wi-Fi sync discovers your Mac over Bonjour (_cadence-sync._tcp), pairs once with a two-minute 6-digit code, and works completely offline with no cloud account. On TestFlight and Apple Developer provisioned builds, private iCloud CloudKit sync (CadenceLibraryZone with incremental CKServerChangeToken fetches) keeps scripts in sync over Wi-Fi or cellular too, including drafts written by an AI tool through the Mac MCP server.

If you edit a script on your Mac while you’re already standing in front of the iPhone camera, Cadence never resets your take mid-read. It shows a quiet “Updated on Mac · Reload” pill until you’re ready.

Where it stands

Cadence iOS is currently at v1.2.0 (build 7) in active TestFlight testing on iOS 26.0+ iPhones, backed by a five-stage verification script (scripts/verify-all.sh) covering plist lint, SwiftPM unit and end-to-end suites (CadenceMedia AVAssetWriter capture, spoken-WAV speech tests, and live Bonjour/CloudKit sync round-trips), macOS and iOS Xcode unit and UI suites (CadenceiOSTests and CadenceiOSUITests), and Release builds for both platforms, alongside a zero-collection privacy policy (PRIVACY.md).

The limits are straightforward. Like the Mac app, it targets iOS 26.0+ APIs (SpeechAnalyzer and Swift 6 concurrency) and iPhone hardware only (TARGETED_DEVICE_FAMILY = 1, no iPad or Mac Catalyst target). Local builds without CloudKit entitlements detect that upfront and fall back cleanly to offline Wi-Fi sync. On older 4–6 GB RAM iPhones, keeping 4K capture and local speech models comfortable together relies on whileInUse model retention and clearing cached ASR models whenever the app moves into the background.

There’s no public App Store link yet while TestFlight builds shake out the last camera, audio-route, and thermal edge cases across devices, though it’s much closer to shipping than build 1 was.