Repository navigation
fix(🍏): build on tvOS and visionOS again, and check every Apple SDK in CI - #607
Merged
Merged
Conversation
tracksWithMediaType: is unavailable on visionOS, so the package did not compile there.
Runs on a hosted macos-latest runner without yarn install or pods: only the Dawn headers are downloaded.
|
🎉 This PR is included in version 0.21.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
wcandillon
added a commit
that referenced
this pull request
Nov 4, 2026
…pple TV (#609) * fix(🍏): declare tvOS in the podspec so autolinking links the pod on Apple TV (#608) React Native's CocoaPods autolinking skips any pod whose podspec does not list the Podfile target's platform, so on a tvOS target react-native-webgpu was silently left out of the installed pods. The Dawn xcframework already ships tvOS device and simulator slices and the sources build on tvOS since #607; only the platforms declaration was missing. The tvOS floor matches the iOS one, as in react-native-tvos' own min_supported_versions. * docs: list tvOS in the home page hero * fix(🍏): stop declaring visionOS, the Dawn package ships no visionOS slice Since #507 Dawn comes from react-native-webgpu-dawn, whose xcframework has no xros or xrsimulator slice, so a visionOS target autolinked the pod and then failed to link it. Drop the claim from the podspec and the docs until the Dawn package ships visionOS binaries again.
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.
Description
Fixes #606. Since 0.20.0 (#597), react-native-webgpu no longer compiles for tvOS:
CAMetalLayer.wantsExtendedDynamicRangeContentis declaredAPI_UNAVAILABLE(tvos, watchos)in the SDK, and@availableis a runtime check, so it can't hide an API the SDK marks unavailable.The property is now compiled only on iOS, macOS and visionOS, as the issue suggested (listing the platforms that support it instead of excluding the ones that don't). On tvOS,
toneMapping: { mode: "extended" }behaves like"standard", and the canvas API docs now say so.Also fixed: visionOS
The new CI check found the same kind of problem on visionOS, which the podspec does declare:
-[AVAsset tracksWithMediaType:](video player, #496) is unavailable there. On visionOS the video track is now read withloadTracksWithMediaType:completionHandler:. Other platforms keep the existing path, since the new API needs macOS 12 and the podspec targets 10.15. The visionOS path compiles but hasn't been run on a device or simulator.CI:
apple-sdksworkflowpackages/webgpu/scripts/check-apple-sdks.shrunsclang++ -fsyntax-onlyon the Apple sources against the iOS, iOS simulator, macOS, visionOS, tvOS and tvOS simulator SDKs. The workflow runs it on a hostedmacos-latestrunner, with noyarn install, pods or simulator: it only downloads the Dawn headers (about 1 MB) for the version pinned inpackages/webgpu/package.json. It runs on PRs that touchapple/,cpp/or the Dawn version.It covers
MetalLayerColorSpace.mmandAppleVideoPlayer.mm. The other files underapple/need React and codegen headers, which only exist after a pod install, so they aren't covered.Locally (
packages/webgpu/scripts/check-apple-sdks.sh, using Dawn headers fromnode_modules):main: fails on appletvos and appletvsimulator (MetalLayerColorSpace.mm) and on xros (AppleVideoPlayer.mm)The check passes
-w, so warnings that were already there don't show (for example,kCGColorSpaceExtendedDisplayP3requires macOS 11 while the podspec targets 10.15, from #586).