@callstack/react-native-visionos

中文文档
0.79.6发布于 2025/08/23MITTypeScript近 30 天下载 1.8万

React Native for visionOS

原始使用文档
文档目录4 节
  1. 🎉 Building your first spatial React Native app
  2. 📖 Documentation
  3. Contributing
  4. Release process
React Native visionOS

Learn once, write anywhere:
Build spatial apps with React.

React Native visionOS allows you to write visionOS with full support for platform SDK. This is a full fork of the main repository with changes needed to support visionOS.

Screenshot

🎉 Building your first spatial React Native app

Follow the Getting Started guide. If you wish to get started quickly, you can utilize this command:

npx @callstack/react-native-visionos@latest init YourApp

📖 Documentation

The full documentation for React Native visionOS can be found on our website.

The source for the React Native visionOS documentation and website is hosted on a separate repo, @callstack/react-native-visionos-docs.

Contributing

Prerequisites:

  • Download the latest Xcode (at least 15.2)
  • Install the latest version of CMake (at least v3.29.0)

Check out rn-tester README.md to build React Native from the source.

Remember to use RNTester-visionOS target

If RNTester-visionOS scheme is not showing up, click "New Scheme", which should be pre-populated with RNTester-visionOS. Build the app using Xcode.

Release process

We use a script called oot-release.js which automatically releases visionos packages and aligns versions of dependencies with React Native core.

Usage:

node ./scripts/oot-release.js --new-version "<visionos-version>" --react-native-version "<react-native-version>" --one-time-password "<otp>"

To test releases and template we use Verdaccio.

版本与发布记录

@callstack/react-native-visionos 共发布 38 个版本,首次发布于 2023/11/28;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.79.6latest2025/08/231.2 年前
0.78.02025/03/031.7 年前
0.77.02025/01/241.8 年前
0.77.0-rc.1next2025/01/071.8 年前
0.77.0-rc.02024/11/271.9 年前
0.76.22024/11/182 年前

其他发布通道:0.73-stable → 0.73.12,next → 0.77.0-rc.1。

关于 @callstack/react-native-visionos 的常见问题

@callstack/react-native-visionos 是什么?

React Native for visionOS

如何安装 @callstack/react-native-visionos?

在项目目录运行 npm install @callstack/react-native-visionos,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 react-native,可以用 npx react-native 直接运行。

@callstack/react-native-visionos 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@callstack/react-native-visionos 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@callstack/react-native-visionos 可以商用吗?

@callstack/react-native-visionos 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@callstack/react-native-visionos 的下载量有多少?

根据 npm 官方下载统计,@callstack/react-native-visionos 在 2026/10/09 – 2026/11/07 这 30 天内被下载 18,115 次,日均约 604 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@callstack/react-native-visionos 还在维护吗?

最新版本 0.79.6 发布于 2025/08/23(1.2 年前);至今共发布 38 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/11/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。