Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function HomePage() {
}`}
>
Powered by Dawn.<br />
Built for iOS, Android, macOS, visionOS, and Web.
Built for iOS, tvOS, Android, macOS, and Web.
</p>
<div className="pointer-events-auto mt-10 flex flex-wrap items-center justify-center gap-3">
<Link
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Installation
description: Your first React Native WebGPU App
---

React Native WebGPU brings the [WebGPU API](https://www.w3.org/TR/webgpu/) to iOS, Android, macOS, and visionOS using [Dawn](https://dawn.googlesource.com/dawn).
React Native WebGPU brings the [WebGPU API](https://www.w3.org/TR/webgpu/) to iOS, tvOS, Android, and macOS using [Dawn](https://dawn.googlesource.com/dawn). visionOS is not supported at the moment: the Dawn binaries do not ship a visionOS slice.

## Install the package

Expand Down Expand Up @@ -35,7 +35,7 @@ Dawn comes as a prebuilt binary that Xcode downloads the first time it resolves
With React Native Skia v3 installed alongside, package resolution checks that both packages link the same Dawn release, and fails if they are not at [compatible versions](/docs/integrations/react-native-skia#compatibility). After changing either version, reset the package caches in Xcode (File > Packages > Reset Package Caches) if the error persists.

<Callout type="warn" title="Platform coverage">
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`).
</Callout>

## Setup
Expand Down
12 changes: 11 additions & 1 deletion packages/webgpu/react-native-webgpu.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down
Loading