Skip to content

Commit 05aa9b9

Browse files
authored
chore(🍏): raise minimum supported macOS to 14.0 (#631)
1 parent f1926b6 commit 05aa9b9

11 files changed

Lines changed: 46 additions & 105 deletions

File tree

‎.yarn/patches/@react-navigation-stack-npm-7.6.0-012930f287.patch‎

Lines changed: 0 additions & 56 deletions
This file was deleted.

‎apps/docs/content/docs/getting-started/installation.mdx‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ npm i react-native-webgpu
1313

1414
## Requirements
1515

16-
| Package | Version | Required |
17-
| ------- | ------- | -------- |
18-
| `react-native` | >= 0.81.0 | Yes |
19-
| `react-native-worklets` | >= 0.7.2 | Optional - off-js-thread rendering |
20-
21-
Please note that this module does not work on the legacy architecture.
22-
23-
On Android it needs Android 8 (API 26) or newer. An app with a lower `minSdkVersion` fails to build; on Expo, the [config plugin](/docs/getting-started/expo#config-plugin) raises it for you.
16+
| | Minimum version |
17+
|:--|:--|
18+
| React Native | `0.81.0`, with the New Architecture |
19+
| iOS | `15.1` |
20+
| tvOS | `15.1` |
21+
| macOS | `14.0` |
22+
| Android | API level 26 (`minSdkVersion = 26`) |
23+
| Worklets (optional) | `react-native-worklets@>=0.7.2`, for off-js-thread rendering |
24+
25+
An Android app with a lower `minSdkVersion` fails to build; on Expo, the [config plugin](/docs/getting-started/expo#config-plugin) raises it for you.
2426

2527
On Android, Gradle downloads the prebuilt Dawn from the [GitHub releases of React Native Skia](https://github.com/wcandillon/react-native-skia/releases), which builds it, the first time it builds, only for the architectures being built, and caches it like any other Gradle dependency. To download it from a mirror or a local directory instead, set the `reactNativeSkiaBinariesUrl` Gradle property (or the `REACT_NATIVE_SKIA_BINARIES_URL` environment variable) to a URL or a `file:///` directory that holds the release assets under `binaries-<version>/`.
2628

‎apps/example-macos/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ yarn workspace example-macos pod:install:macos
1616
yarn workspace example-macos build:macos
1717
```
1818

19-
The app targets macOS 14. Dawn comes from `react-native-webgpu-dawn`; nothing
19+
The app targets macOS 14.0. Dawn comes from `react-native-webgpu-dawn`; nothing
2020
is built from Dawn sources. For development, run these in separate terminals:
2121

2222
```sh

‎apps/example-macos/metro.config.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ const { dependencies } = require("./package.json");
55

66
const config = makeMetroConfig({
77
projectRoot: __dirname,
8+
server: {
9+
enhanceMiddleware: (middleware) => (req, res, next) => {
10+
// Metro normalizes ../ out of URL paths; keep shared asset paths in its query.
11+
if (req.url?.startsWith("/assets/") && req.url.includes("@@/")) {
12+
req.url = req.url
13+
.replace("/assets/", "/assets?unstable_path=")
14+
.replaceAll("@@/", "../");
15+
}
16+
17+
return middleware(req, res, next);
18+
},
19+
},
820
transformer: {
921
// Ignore sibling apps' Babel configs when compiling their shared sources.
1022
enableBabelRCLookup: false,

‎apps/example-macos/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"bundle:macos": "react-native bundle --entry-file index.js --platform macos --dev true --bundle-output dist/main.macos.jsbundle --assets-dest dist"
1111
},
1212
"dependencies": {
13-
"@react-navigation/native": "^7.0.15",
14-
"@react-navigation/stack": "7.6.0",
13+
"@react-navigation/native": "^7.5.2",
14+
"@react-navigation/stack": "7.12.2",
1515
"@react-three/fiber": "^9.4.0",
1616
"@tensorflow/tfjs": "^4.22.0",
1717
"@tensorflow/tfjs-backend-webgpu": "^4.22.0",

‎apps/example/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
},
1717
"dependencies": {
1818
"@react-native/assets-registry": "0.88.1",
19-
"@react-navigation/elements": "^2.2.6",
20-
"@react-navigation/native": "^7.0.15",
21-
"@react-navigation/stack": "7.6.0",
19+
"@react-navigation/elements": "^2.9.46",
20+
"@react-navigation/native": "^7.5.2",
21+
"@react-navigation/stack": "7.12.2",
2222
"@react-three/fiber": "^9.4.0",
2323
"@tensorflow/tfjs": "^4.22.0",
2424
"@tensorflow/tfjs-backend-webgpu": "^4.22.0",

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"@types/react": "^19.2.0",
1010
"@webgpu/types": "^0.1.42",
1111
"@react-three/fiber@^9.4.0": "patch:@react-three/fiber@npm%3A9.4.0#./.yarn/patches/@react-three-fiber-npm-9.4.0-77fe8ee9bd.patch",
12-
"react-native-macos@0.83.0": "patch:react-native-macos@npm%3A0.83.0#./.yarn/patches/react-native-macos-npm-0.83.0-macos-codegen-file-request-handler.patch",
13-
"@react-navigation/stack@7.6.0": "patch:@react-navigation/stack@npm%3A7.6.0#./.yarn/patches/@react-navigation-stack-npm-7.6.0-012930f287.patch"
12+
"react-native-macos@0.83.0": "patch:react-native-macos@npm%3A0.83.0#./.yarn/patches/react-native-macos-npm-0.83.0-macos-codegen-file-request-handler.patch"
1413
},
1514
"packageManager": "yarn@3.6.1",
1615
"scripts": {

‎packages/webgpu/CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Dawn, the WebGPU implementation, is prebuilt; there is nothing to build:
1717

1818
Example app (from `apps/example/`): `yarn start` · `yarn ios` · `yarn android`
1919

20-
The [macOS runner](../../apps/example-macos/README.md) shares the gallery with an isolated RN macOS 0.83 dependency stack. It uses the same prebuilt Dawn package; no Dawn source build is needed.
20+
The [macOS runner](../../apps/example-macos/README.md) requires macOS 14.0 or newer and shares the gallery with an isolated RN macOS 0.83 dependency stack.
2121

2222
From the repo root: `yarn lint` · `yarn tsc` · `yarn build:docs`
2323

‎packages/webgpu/react-native-webgpu.podspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Pod::Spec.new do |s|
5656
s.platforms = {
5757
:ios => min_ios_version_supported,
5858
:tvos => min_ios_version_supported,
59-
:osx => "10.15",
59+
:osx => "14.0",
6060
}
6161
s.source = { :git => "https://github.com/wcandillon/react-native-webgpu.git", :tag => "#{s.version}" }
6262

‎packages/webgpu/scripts/check-apple-sdks.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ FILES=(apple/RNWGUIKit.h apple/MetalLayerColorSpace.mm apple/AppleVideoPlayer.mm
2626
TARGETS=(
2727
iphoneos:arm64-apple-ios15.1
2828
iphonesimulator:arm64-apple-ios15.1-simulator
29-
macosx:arm64-apple-macos10.15
29+
macosx:arm64-apple-macos14.0
3030
xros:arm64-apple-xros1.0
3131
appletvos:arm64-apple-tvos15.1
3232
appletvsimulator:arm64-apple-tvos15.1-simulator

0 commit comments

Comments
 (0)