Fix tvOS/visionOS build: import AVFoundation in VideoPlayerViewUIView#7000
Merged
Conversation
…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>
ajpallares
approved these changes
Jun 15, 2026
2 tasks
This was referenced Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
purchases-androidand hybridsMotivation
Follow-up to #6987 / #6997: the tvOS and visionOS CI builds fail with
type 'AVPlayerItem' has no member 'didPlayToEndTimeNotification'.Description
AVPlayerItem.didPlayToEndTimeNotificationis declared in AVFoundation, but the controls-path file imported onlyAVKit. AVKit re-exposes the symbol on iOS and Mac Catalyst (so those builds passed) but not on tvOS/visionOS. ImportingAVFoundationexplicitly fixes it — the same pattern the existing watchOS code inVideoPlayerView.swiftalready uses for this symbol. No deployment-target or behavior changes.Verified by building
RevenueCatUIon 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 AVFoundationtoVideoPlayerViewUIView.swiftso the controls-path video player can referenceAVPlayerItem.didPlayToEndTimeNotificationwhen 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.