feat(sports): Follow teams, pool game info, Watch from start, and a score bar #17
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/sports-phone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3 of the iPhone Sports handoff: followed teams, the pool's game info, Watch from start, and a score bar in full screen. Stacked on #16 (Favorites spelling), which isn't merged yet, so this diff includes its commit. After #16 merges, the diff drops to this PR's own commit.
What changed
SportsStore.followed). The long-press menu on any game offers "Follow Commanders" and "Follow Giants", and the game page has Follow chips. Teams are saved in UserDefaults (sports.followed) asleague:teamId, because ESPN team ids are only unique within a league.pool_event.description(records, venue, networks) is a second line on More from the pool rows and sits under the networks on the game page for games the pool carries. Tonight 39 pool events had one.hasArchive), the long-press menu and the game page offer "Watch from start · 8:15 PM". It plays the channel's archive from kickoff to now throughplayFromStart. Pool-only events get the same menu item, using their own event programme.LiveWire/Sports/ScoreBar.swift). In full screen it reads "WSH 14 – 10 NYG · Q3 4:12" next to the close button. It belongs to the transport controls, so it hides with them. It shows the game playback was started from on Sports, or else any live game the playing channel carries. It reloads the scores every 30 s, but only while it's on screen. It's hidden during catch-up so it can't spoil the game. Swiping still zaps through channels, as decided.-sportsFollow <league:id,…>,-sportsLeague follow,-sportsPlay <n>(add-fromStart), and-sportsFakeLive. The last one turns the first coming game live at 14–10 and adds a point on each reload, to try the bar when nothing is on.Intent: the phone-only Sports features from the handoff. Not a goal: the Live Activity and widget (dropped), or porting these features back to the TV app.
Testing
iPhone 18 Pro Simulator, Debug build, tv3, Wednesday 11 November 11:00 AM ET. No ESPN game was live this morning, so the score bar and Watch from start were tried with
-sportsFakeLiveon Commanders @ Giants. It matched "NFL GAME 01 : WASHINGTON COMMANDERS @ NEW YORK GIANTS".nfl:19), the game showed under My teams and On now, and the Following chip read 1.xcodebuild testwith the tv3 login: 65 unit tests and 3 UI tests pass.Not checked on screen: the Followed teams rows in Settings, which sit below the fold and need a scroll the screenshot script can't do.
Screenshots