Files
MatchLiveTv/native/ios/README.md
Emiliano Frascaro 585332e32e Aggiunge app iOS nativa con parità multi-sport e test unitari.
Porting SwiftUI da Android (auth, hub, wizard, broadcast RTMP, overlay, scoring board-aware), reload hub al ritorno da diretta, decodifica score tollerante e documentazione allineata.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 21:37:32 +02:00

85 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Match Live TV — app iOS nativa
Porting SwiftUI dell'app Android con stessa UI, brand e contratti API backend.
## Stack
- UI: SwiftUI, NavigationStack
- Rete: URLSession + Codable
- Auth: Keychain
- Streaming: HaishinKit (RTMP) + AVFoundation
- Overlay: Core Graphics (bitmap composito su pipeline video)
## Struttura
```
MatchLiveTv/
App/ — entry point
Core/ — config, token store, utility
Data/ — API, repository, ActionCable
Domain/ — modelli
Streaming/ — motore RTMP, overlay nativi
UI/ — schermate SwiftUI
Resources/ — Assets.xcassets (brand), Info.plist
```
## Parità multi-sport (riferimento: `docs/TABELLONI_E_OVERLAY.md`)
| Board | Controlli broadcast | Overlay video | Stato iOS |
|-------|---------------------|---------------|-----------|
| volley / racket | +1, undo, chiudi set (API `close_set`) | Tabellone a colonne | Completo |
| basket | +1/+2/+3, undo, `advance_period` | Compact scoreboard | Completo |
| timed | +1, undo, `advance_period` | Compact scoreboard | Completo |
| generic | +1 / undo locale | Watermark | Completo |
| timer | — | Solo watermark | Completo |
Il cronometro basket/timed è gestito in **regia web**, non sull'overlay video (come Android).
## Asset brand
Gli asset in `brand/` sono importati in `Resources/Assets.xcassets`:
- `logo-white-m`, `logo-white-m-256` — wordmark e watermark
- `logo-dark-gradient`, `logo-dark-gradient-256` — app icon
- `CopertinaCanale*.png` — riferimenti visivi brand
## Build
```bash
python3 generate_xcodeproj.py # rigenera MatchLiveTv.xcodeproj
./scripts/build_ios_release.sh
```
Override API: `API_BASE_URL=https://staging.example.com ./scripts/build_ios_release.sh`
## Test
```bash
cd native/ios
python3 generate_xcodeproj.py
xcodebuild -project MatchLiveTv.xcodeproj -scheme MatchLiveTv \
-destination 'platform=iOS Simulator,name=iPhone 17' \
-derivedDataPath build/DerivedData \
ONLY_ACTIVE_ARCH=YES ARCHS=arm64 EXCLUDED_ARCHS=x86_64 \
test -only-testing:MatchLiveTvTests
```
## Requisiti
- Xcode 16+
- iOS 16+
- Mac con Apple Silicon o Intel
## Funzionalità
- Login JWT, hub partite (reload al ritorno da diretta), wizard 3 step
- Diretta RTMP 1280×720 con overlay tabellone/watermark
- ActionCable SessionChannel per punteggio e comandi regia
- Telemetria dispositivo periodica
- Orientamento: portrait ovunque, landscape solo in broadcast
## Documentazione correlata
- [`docs/TABELLONI_E_OVERLAY.md`](../../docs/TABELLONI_E_OVERLAY.md) — regolamenti, board, overlay
- [`docs/MULTI_SPORT.md`](../../docs/MULTI_SPORT.md) — catalogo sport e engine scoring
- [`docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) — infrastruttura e flussi live/HLS