diff --git a/apps/docs/app/(home)/page.tsx b/apps/docs/app/(home)/page.tsx index d8cc5ef1e..d36a257d4 100644 --- a/apps/docs/app/(home)/page.tsx +++ b/apps/docs/app/(home)/page.tsx @@ -53,7 +53,7 @@ export default function HomePage() { }`} > Powered by Dawn.
- Built for iOS, Android, macOS, visionOS, and Web. + Built for iOS, tvOS, Android, macOS, and Web.

Packages > Reset Package Caches) if the error persists. -The Swift package targets iOS only - macOS, Android and visionOS still require the CocoaPods/Gradle autolinked path. See `spm-example` at the root of the [react-native-webgpu repo](https://github.com/wcandillon/react-native-webgpu) for a working reference project, and its README for the gotchas (stale `Package.resolved`, the stub `Podfile`). +The Swift package targets iOS only - tvOS, macOS and Android still require the CocoaPods/Gradle autolinked path. See `spm-example` at the root of the [react-native-webgpu repo](https://github.com/wcandillon/react-native-webgpu) for a working reference project, and its README for the gotchas (stale `Package.resolved`, the stub `Podfile`). ## Setup diff --git a/packages/webgpu/react-native-webgpu.podspec b/packages/webgpu/react-native-webgpu.podspec index 867f6395f..49d84612f 100644 --- a/packages/webgpu/react-native-webgpu.podspec +++ b/packages/webgpu/react-native-webgpu.podspec @@ -47,7 +47,17 @@ Pod::Spec.new do |s| s.license = package["license"] s.authors = package["author"] - s.platforms = { :ios => min_ios_version_supported, :osx => "10.15", :visionos => "1.0" } + # React Native's CocoaPods autolinking drops any pod whose podspec does not + # declare the Podfile target's platform (#608), so every platform the Dawn + # xcframework ships a slice for is listed. react-native-tvos keeps the tvOS + # floor equal to the iOS one (its min_supported_versions helper). visionOS + # is not listed: react-native-webgpu-dawn ships no xros slice, so a visionOS + # target would autolink the pod and then fail to link it. + s.platforms = { + :ios => min_ios_version_supported, + :tvos => min_ios_version_supported, + :osx => "10.15", + } s.source = { :git => "https://github.com/wcandillon/react-native-webgpu.git", :tag => "#{s.version}" } # CocoaPods is the supported default. Package.swift (React Native 0.87+