Skip to content

Fix tvOS/visionOS build: import AVFoundation in VideoPlayerViewUIView#7000

Merged
alexrepty merged 1 commit into
mainfrom
alex/fix-video-avfoundation-import
Jun 15, 2026
Merged

Fix tvOS/visionOS build: import AVFoundation in VideoPlayerViewUIView#7000
alexrepty merged 1 commit into
mainfrom
alex/fix-video-avfoundation-import

Conversation

@alexrepty

@alexrepty alexrepty commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

Motivation

Follow-up to #6987 / #6997: the tvOS and visionOS CI builds fail with type 'AVPlayerItem' has no member 'didPlayToEndTimeNotification'.

Description

AVPlayerItem.didPlayToEndTimeNotification is declared in AVFoundation, but the controls-path file imported only AVKit. AVKit re-exposes the symbol on iOS and Mac Catalyst (so those builds passed) but not on tvOS/visionOS. Importing AVFoundation explicitly fixes it — the same pattern the existing watchOS code in VideoPlayerView.swift already uses for this symbol. No deployment-target or behavior changes.

Verified by building RevenueCatUI on iOS, tvOS, visionOS, watchOS, macOS, and Mac Catalyst.


Note

Low Risk
Single import-line change with no logic or deployment-target changes; only restores compile-time access to an API already used in the file.

Overview
Adds an explicit import AVFoundation to VideoPlayerViewUIView.swift so the controls-path video player can reference AVPlayerItem.didPlayToEndTimeNotification when setting up manual loop observers.

That notification lives in AVFoundation; importing only AVKit was enough on iOS and Mac Catalyst but breaks compilation on tvOS and visionOS, where CI reported the symbol missing. Runtime behavior is unchanged—this only fixes cross-platform builds, matching the watchOS pattern in VideoPlayerView.swift.

Reviewed by Cursor Bugbot for commit 77020b4. Bugbot is set up for automated code reviews on this repo. Configure here.

…fication

`AVPlayerItem.didPlayToEndTimeNotification` is declared in AVFoundation. The
controls-path file imported only AVKit, which re-exposes the symbol on iOS and
Mac Catalyst but not on tvOS/visionOS, breaking those CI builds. Import
AVFoundation explicitly, matching the existing watchOS code in VideoPlayerView.swift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alexrepty alexrepty requested a review from a team as a code owner June 15, 2026 10:37
@alexrepty alexrepty enabled auto-merge (squash) June 15, 2026 10:49
@alexrepty alexrepty requested a review from a team June 15, 2026 11:43
@alexrepty alexrepty merged commit 863893b into main Jun 15, 2026
19 of 27 checks passed
@alexrepty alexrepty deleted the alex/fix-video-avfoundation-import branch June 15, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants