A shell around the ipodderx-rs web UI whose audio is played by the host rather than the page, so it carries on with the screen locked and a car can control it. The page's half of the bridge is web/src/native.ts in ipodderx-rs (#45): it replaces the playback surface of the page's media element with one that posts here, so player.ts is unchanged and the player bar, the row buttons and the keyboard shortcuts work as they always did. Playback, Library, Bridge and CookieBridge never touch a view, which is what makes a CarPlay scene a later addition rather than a rewrite, and what lets the same target build for Mac Catalyst with no conditional code: AVAudioSession, MPNowPlayingInfoCenter and the remote commands all exist there. The Mac gets media keys and Now Playing; it has no CarPlay and no lock screen, so it is a convenience rather than the reason for any of this. Authentication is the web view's. ipx decides who is asking by cookie -- ipx_session, and CF_Authorization from Cloudflare Access in front of the tunnel -- and its auth layer was written so a plain <audio src> would work, which is why the player needs no API of its own. CookieBridge keeps HTTPCookieStorage in step with the web view's store and hands them to each asset. Named ipodderx-app, not -ios: native.ts already carries the branch for an Android host, and the iOS project is one directory rather than the repo. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
87 lines
3.0 KiB
YAML
87 lines
3.0 KiB
YAML
# XcodeGen makes the .xcodeproj from this, so the project is something you can read in a diff
|
|
# rather than a pbxproj nobody can review.
|
|
#
|
|
# brew install xcodegen && xcodegen generate && open iPodderX.xcodeproj
|
|
name: iPodderX
|
|
options:
|
|
bundleIdPrefix: net.sdf1
|
|
deploymentTarget:
|
|
iOS: "16.0"
|
|
macOS: "13.0"
|
|
createIntermediateGroups: true
|
|
settings:
|
|
base:
|
|
SWIFT_VERSION: "5.9"
|
|
TARGETED_DEVICE_FAMILY: "1,2"
|
|
CODE_SIGN_STYLE: Automatic
|
|
targets:
|
|
iPodderX:
|
|
type: application
|
|
platform: iOS
|
|
# The same UIKit app on the Mac. Everything that matters -- Playback, Library, Bridge,
|
|
# CookieBridge -- never touches a view, so only the shell is platform-specific.
|
|
supportsMacCatalyst: true
|
|
sources:
|
|
- Sources
|
|
info:
|
|
path: Resources/Info.plist
|
|
properties:
|
|
CFBundleDisplayName: iPodderX
|
|
CFBundleShortVersionString: "0.1.0"
|
|
CFBundleVersion: "1"
|
|
# Playing on with the screen locked. This is a plist key, not a signed entitlement, so it
|
|
# works on a free personal team -- unlike CarPlay, which Apple has to grant.
|
|
UIBackgroundModes: [audio]
|
|
UILaunchScreen: {}
|
|
# iOS 27 will not run an app that has not adopted the scene lifecycle. A CarPlay app is a
|
|
# second scene beside this one, so its role goes here too when the entitlement exists.
|
|
UIApplicationSceneManifest:
|
|
UIApplicationSupportsMultipleScenes: false
|
|
UISceneConfigurations:
|
|
UIWindowSceneSessionRoleApplication:
|
|
- UISceneConfigurationName: Default Configuration
|
|
UISceneDelegateClassName: $(PRODUCT_MODULE_NAME).SceneDelegate
|
|
UIRequiresFullScreen: false
|
|
UISupportedInterfaceOrientations:
|
|
- UIInterfaceOrientationPortrait
|
|
- UIInterfaceOrientationLandscapeLeft
|
|
- UIInterfaceOrientationLandscapeRight
|
|
UIStatusBarStyle: UIStatusBarStyleLightContent
|
|
# Only needed to point the app at the LAN address, which is plain HTTP. The tunnel is
|
|
# HTTPS and needs none of this.
|
|
NSAppTransportSecurity:
|
|
NSAllowsLocalNetworking: true
|
|
settings:
|
|
base:
|
|
PRODUCT_BUNDLE_IDENTIFIER: net.sdf1.ipodderx
|
|
MARKETING_VERSION: "0.1.0"
|
|
# Set as build settings rather than xcodegen's supportsMacCatalyst:, which this version
|
|
# accepts and then writes nothing for -- the generated project had no SUPPORTS_MACCATALYST
|
|
# at all and the Mac destination simply did not exist.
|
|
SUPPORTS_MACCATALYST: "YES"
|
|
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER: "NO"
|
|
|
|
iPodderXUITests:
|
|
type: bundle.ui-testing
|
|
platform: iOS
|
|
sources:
|
|
- UITests
|
|
dependencies:
|
|
- target: iPodderX
|
|
settings:
|
|
base:
|
|
PRODUCT_BUNDLE_IDENTIFIER: net.sdf1.ipodderx.uitests
|
|
|
|
schemes:
|
|
iPodderX:
|
|
build:
|
|
targets:
|
|
iPodderX: all
|
|
iPodderXUITests: [test]
|
|
run:
|
|
config: Debug
|
|
test:
|
|
config: Debug
|
|
targets:
|
|
- iPodderXUITests
|