mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
feat(ios): port the Android client to SwiftUI
The iOS client is now a screen-for-screen port of the Android app over the same pstr-android UniFFI surface, with no Rust changes: Library, title page, History, Shares (public links and Drive folders), Downloads and Settings, with the same strings, undo snackbars and two-pane layout on wide screens. - Theme from the engine's palette (Material role names, Inter, the same type ramp and corners), repainted live from the appearance settings. - Account sign-in with two-factor code, mailbox password and the Proton CAPTCHA in a non-persistent WKWebView, the Drive folder browser, and watch-history sync every five minutes, after sign-in, on player close and when the app leaves the screen. - Player over libmpv: resume, progress saved every 5 s, autoplay with the up-next card, skip and auto-skip from the chapter plan, track, speed, volume and episode pickers, landscape lock, mini transport, and lock-screen controls with interruption and route-change handling. - Offline downloads with the Android record format, free-space floor, retries, transfer rate and the Wi-Fi-only policy; interrupted transfers resume at next launch. - Config, data and download state are excluded from backup, as Android's allowBackup=false: a restore would bring shares back without their Keychain secrets and give two devices one sync identity. Picture-in-picture, the share sheet and background downloads are not possible the same way on iOS; docs/IOS.md lists why and what replaces them. Adds XCTest ports of the Android unit tests, a `test` command to scripts/build-ios.sh, the app icon and its render script, and an iOS workflow on macos-15 that runs the tests and builds the unsigned .ipa.
This commit is contained in:
1 parent
da16ab0575
commit
ed05a1e723
38 files changed
+7546
-208
No files matched your search
+47
-2
@@ -17,8 +17,24 @@ targets:
|
||||
platform: iOS
|
||||
sources:
|
||||
- path: ProtonStream
|
||||
excludes:
|
||||
# The icon's source; the asset catalog holds what it renders to.
|
||||
- Resources/AppIcon.svg
|
||||
- Resources/THIRD_PARTY_NOTICES.md
|
||||
- path: ProtonStream/Resources/THIRD_PARTY_NOTICES.md
|
||||
buildPhase: resources
|
||||
# UniFFI output, written by `scripts/build-ios.sh bindings`.
|
||||
- path: build/generated/PstrBridge.swift
|
||||
# Shared with the Android client rather than copied: Inter, and the
|
||||
# licence texts the About page shows.
|
||||
- path: ../android/app/src/main/res/font/inter_regular.ttf
|
||||
buildPhase: resources
|
||||
- path: ../android/app/src/main/res/font/inter_semibold.ttf
|
||||
buildPhase: resources
|
||||
- path: ../android/app/src/main/assets/licenses/GPL-3.0.txt
|
||||
buildPhase: resources
|
||||
- path: ../android/app/src/main/assets/licenses/Inter-OFL.txt
|
||||
buildPhase: resources
|
||||
dependencies:
|
||||
# The GPL build is the one with libass and every demuxer; the app is
|
||||
# sideloaded, never distributed through the App Store.
|
||||
@@ -26,6 +42,9 @@ targets:
|
||||
product: MPVKit-GPL
|
||||
- sdk: Security.framework
|
||||
- sdk: SystemConfiguration.framework
|
||||
scheme:
|
||||
testTargets:
|
||||
- ProtonStreamTests
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: io.narl.protonstream
|
||||
@@ -33,9 +52,11 @@ targets:
|
||||
CURRENT_PROJECT_VERSION: ${PSTR_BUILD}
|
||||
SWIFT_VERSION: "5.0"
|
||||
TARGETED_DEVICE_FAMILY: "1,2"
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
||||
SWIFT_OBJC_BRIDGING_HEADER: ProtonStream/Bridge/ProtonStream-Bridging-Header.h
|
||||
HEADER_SEARCH_PATHS: $(PROJECT_DIR)/build/generated
|
||||
LIBRARY_SEARCH_PATHS: $(PROJECT_DIR)/../target/aarch64-apple-ios/release
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]": $(PROJECT_DIR)/../target/aarch64-apple-ios/release
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]": $(PROJECT_DIR)/../target/aarch64-apple-ios-sim/release
|
||||
OTHER_LDFLAGS: -lpstr_android
|
||||
info:
|
||||
path: ProtonStream/Info.plist
|
||||
@@ -44,8 +65,18 @@ targets:
|
||||
LSRequiresIPhoneOS: true
|
||||
ITSAppUsesNonExemptEncryption: false
|
||||
UIBackgroundModes: [audio]
|
||||
UILaunchScreen: {}
|
||||
# The Proton palette's page colour, so a dark app does not open on white.
|
||||
UILaunchScreen:
|
||||
UIColorName: LaunchBackground
|
||||
UIRequiresFullScreen: false
|
||||
UIAppFonts:
|
||||
- inter_regular.ttf
|
||||
- inter_semibold.ttf
|
||||
# A share link handed over from elsewhere: protonstream://add?url=…,
|
||||
# or the link with its scheme swapped (IncomingShareLink.swift).
|
||||
CFBundleURLTypes:
|
||||
- CFBundleURLName: io.narl.protonstream.share-link
|
||||
CFBundleURLSchemes: [protonstream]
|
||||
UISupportedInterfaceOrientations:
|
||||
- UIInterfaceOrientationPortrait
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
@@ -55,3 +86,17 @@ targets:
|
||||
- UIInterfaceOrientationPortraitUpsideDown
|
||||
- UIInterfaceOrientationLandscapeLeft
|
||||
- UIInterfaceOrientationLandscapeRight
|
||||
|
||||
# The pure logic the Android unit tests pin, pinned again here: hosted in the
|
||||
# app, so `@testable import` reaches it, on the simulator.
|
||||
ProtonStreamTests:
|
||||
type: bundle.unit-test
|
||||
platform: iOS
|
||||
sources:
|
||||
- path: ProtonStreamTests
|
||||
dependencies:
|
||||
- target: ProtonStream
|
||||
settings:
|
||||
base:
|
||||
SWIFT_VERSION: "5.0"
|
||||
GENERATE_INFOPLIST_FILE: YES
|
||||
Reference in new issue
Block a user