# ADR 0012: iPad and Mac Catalyst support - **Status:** Accepted - **Date:** 2026-09-25 ## Context Hydraulophone began as an iPhone app. The product now needs to run on iPad and Mac while keeping one shared SwiftUI feature implementation. The app already uses UIKit, WebKit, MediaPlayer, and AVFoundation in an iOS-oriented playback and authentication stack, so a separate native macOS application would require parallel platform adapters and substantially more maintenance. ## Decision - Make the iOS app universal for iPhone and iPad, and build the same app target for Mac Catalyst. - Keep iPhone navigation as a bottom tab bar. Use `NavigationSplitView` for regular-width iPad layouts and Mac Catalyst, with a native sidebar for Home, Search, Library, and Settings. - Give the Mac app a desktop-sized resizable window, the system sidebar commands, and standard playback menu shortcuts. - Keep CarPlay limited to iOS. Do not compile its scene delegate into the Mac Catalyst product. - Use AVPlayer/AVAudioEngine playback on Mac without configuring iOS `AVAudioSession`; macOS owns its audio session and route behavior. Continue using MediaPlayer metadata and remote commands on Catalyst, where the newer iOS `NowPlaying` framework is unavailable. Mac Catalyst is preferred over a separate native macOS target because it lets the existing UIKit/WebKit services and the shared feature UI remain one implementation, while SwiftUI and Catalyst provide native Mac window, sidebar, menu, and keyboard behavior. ## Consequences and follow-up - XcodeGen builds iOS and Mac Catalyst from the same checked-in project specification; `just mac` builds and launches the Mac app. The iOS device family includes both iPhone and iPad. - Mac Catalyst has a dedicated Keychain access-group entitlement. `just mac` signs with a locally available Apple Development team and allows Xcode to update provisioning by default; set `HYDRAULOPHONE_DEVELOPMENT_TEAM` to choose a team or `HYDRAULOPHONE_ALLOW_PROVISIONING_UPDATES=0` to disable remote profile updates. - The iPhone tab interface is unchanged. Regular-width iPad and Mac use platform-standard split navigation. - Initial verification on 2026-09-25 built the Mac Catalyst target and the iPad Air 11-inch simulator target. Offline fixture launches succeeded on the host Mac and simulator; the iPad run displayed the sidebar and library layout. Automated tests were intentionally not run at the owner's request. - Keychain restore, WebKit sign-in, downloads, Now Playing integration, and long-running playback still need hands-on validation on an iPad and Mac before claiming release readiness. - Keep Mac Catalyst-specific API substitutions small and isolated. Do not weaken iOS interruption, audio-route, background-playback, or CarPlay behavior to accommodate macOS.