跳到正文
cccskills
Expo 官方免费在 GitHub 公开

expo-brownfield

Embed Expo and React Native screens in an existing iOS or Android app. Choose between packaged libraries and direct build integration, connect the new feature to native navigation, and verify data exchange and release behavior inside the host app.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Integrate Expo and React Native into an existing native iOS or Android app. Use for brownfield, embedding a React Native screen in SwiftUI/UIKit or Kotlin, or AAR/XCFramework packaging. Covers isolated and integrated approaches. For building or distributing a purely native app with EAS, use eas-app-stores.

实测评分 未实测

查看安装方法

适用场景

  • Add a React Native screen to a SwiftUI, UIKit, or Kotlin app
  • Choose between packaged libraries and direct integration
  • Distribute React Native features as AAR or XCFramework
  • Verify data exchange, dismissal, and reopening in the host app

包含的文件(8)

  • SKILL.md5.7 KB
  • agents/openai.yaml420 B
  • references/brownfield-integrated.md22.2 KB
  • references/brownfield-isolated.md21.8 KB
  • references/comparison.md6.6 KB
  • references/feature-integration.md9.9 KB
  • references/troubleshooting.md8.2 KB
  • references/version-compatibility.md4.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Expo Brownfield

A brownfield app is an existing native iOS or Android app that adopts React Native incrementally, as opposed to a greenfield app that is React Native from day one.

Inspect the host first

Identify the existing app entry point, navigation owner, native build system, deployment targets, and any React Native runtime already linked. Record the installed Expo, React Native, and brownfield package versions from the lockfile. Adding EAS Build or Submit to a Swift app alone does not require React Native; route that task to eas-app-stores.

Preserve the host's SwiftUI App / UIKit window and native screens when embedding a feature. Do not run prebuild in a manually maintained native host, including during troubleshooting. An isolated Expo producer may use CNG; keep its generated ios/ and android/ separate from the consuming app.

Expo supports two distinct ways to add React Native to a brownfield project:

ApproachWhat ships to the native appWhen to choose
IsolatedPrebuilt AAR / XCFrameworkNative team doesn't need Node or RN tooling; RN code can live in a separate repo
IntegratedReact Native sources added to the existing Gradle / CocoaPods buildOne team owns everything; comfortable with RN tooling; wants a single build

For the full decision matrix, see ./references/comparison.md.

Pick an approach

Use these quick rules — fall through to comparison.md for anything ambiguous.

  • Choose isolated if the iOS/Android team must consume RN as a regular library dependency (AAR or XCFramework), without installing Node, Yarn, or the React Native build toolchain.
  • Choose isolated if RN code and native code live in separate repositories or release on independent cadences.
  • Choose integrated if a single team owns both the native and RN code and is willing to add React Native + Expo to the native project's Gradle and CocoaPods setup.
  • Both approaches support Metro and Fast Refresh in Debug. Choose integrated for shared build ownership, not because isolated lacks live JS iteration.

References

  • ./references/brownfield-isolated.md -- Build RN as AAR/XCFramework and consume from the native app (BrownfieldActivity, ReactNativeViewController, ReactNativeView)
  • ./references/brownfield-integrated.md -- Add RN and Expo directly to existing Gradle and CocoaPods builds, preserving the native app shell
  • ./references/feature-integration.md -- Pass input, return results, dismiss, clean up listeners, and forward lifecycle events; includes a SwiftUI host example
  • ./references/comparison.md -- Decision criteria, trade-offs, and scenario mapping for choosing an approach
  • ./references/troubleshooting.md -- Metro connection, build, signing, and module-resolution issues common to both approaches

More information available at https://docs.expo.dev/brownfield/overview/

Shared prerequisites

Both approaches require, in the environment that builds the React Native side:

  • Node.js (LTS) — runs the Expo CLI and JavaScript code.
  • The project's package manager and lockfile — npm, Yarn, pnpm, or Bun. Do not switch package managers just to follow an example.

The iOS build environment needs Xcode and CocoaPods (use the project's Gemfile/Bundler setup when present). The isolated consuming app needs Xcode but no CocoaPods or RN tooling just to consume the artifacts.

Select compatible versions

For an existing Expo/RN project, keep its selected SDK and use npx expo install to align dependencies. Do not upgrade it just to follow this skill. For a new producer, use the current stable SDK compatible with the host's OS support, dependencies, and build toolchain; confirm the release is stable before selecting it.

Before native setup, read ./references/version-compatibility.md for matching native templates, toolchain/OS requirements, and build defaults across SDK versions. A purely native consumer has no Expo SDK version to pin, but must satisfy the artifact's requirements.

Verify the feature in the host

Open the RN screen with input, return a result to native, dismiss, and reopen with fresh input. Check listener cleanup and the host's original navigation. Then build the host in Release with a Release artifact and Metro stopped. Rendering only in Expo Go or the producer's example app does not validate the integration. See ./references/feature-integration.md for the complete acceptance scenario.

Submitting Feedback

If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:

npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-brownfield" "<actionable feedback>"

Only submit when you have something specific and actionable to report. Include as much relevant context as possible. If an agent repeatedly fails at an Expo task or the user has to step in, submit a brief report of the task, expected result, and what went wrong using --category evals and the relevant Expo package or command as --subject.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

eas-app-stores

Expo 官方免费

Build and submit iOS and Android apps through EAS, an app delivery service. Covers signing, version numbers, store listing information, automated release workflows, and checking submission progress for Expo, React Native, and existing native apps.

中文简介正在准备中。当前显示英语简介。

  • Distributing an iOS beta through TestFlight
  • Preparing an App Store or Google Play submission
  • Configuring signing and build version numbers
expo/skills29982026年10月22日 更新

eas-hosting

Expo 官方免费

Create server endpoints and deploy Expo web apps to EAS Hosting. Covers production and preview deployments, secret environment variables, custom domains, and adapting server code to Cloudflare Workers, the runtime that executes hosted API routes.

中文简介正在准备中。当前显示英语简介。

  • Publishing an Expo web app
  • Creating preview URLs for pull requests
  • Building API proxies that keep keys on the server
expo/skills29982026年10月22日 更新

eas-observe

Expo 官方免费

Add EAS Observe to an Expo app to track startup and navigation performance, custom events, errors, and crashes. Query collected data through the EAS CLI and interpret measurements to investigate slow startup and other performance problems.

中文简介正在准备中。当前显示英语简介。

  • Add performance monitoring to a production Expo app
  • Investigate slow startup and navigation
  • Review JavaScript errors and native crashes
expo/skills29982026年10月22日 更新

eas-simulator

Expo 官方免费

Run an app on a remote iOS or Android simulator hosted by EAS. Control screens, capture screenshots and video, or connect a development build for live updates when a suitable local simulator is unavailable.

中文简介正在准备中。当前显示英语简介。

  • Checking an iOS app from Linux or a cloud environment
  • Having an agent navigate screens and capture screenshots
  • Checking animations and transitions with screen recordings
expo/skills29982026年10月22日 更新

eas-update

Expo 官方免费

Configure EAS Update to deliver compatible JavaScript, styling, and assets to installed apps without a new native build. Guides publishing to selected channels, testing release behavior, and investigating updates that fail to appear.

中文简介正在准备中。当前显示英语简介。

  • Set up remote updates for an Expo app
  • Publish JavaScript fixes to preview or staging
  • Investigate updates missing from TestFlight or production builds
expo/skills29982026年10月22日 更新

eas-update-insights

Expo 官方免费

Assess published EAS Update health using aggregate metrics for crashes, adoption, and payload size. Compare platforms and channels, inspect daily trends, and check how many users run the bundled version versus an over-the-air update.

中文简介正在准备中。当前显示英语简介。

  • Checking update health after publication
  • Comparing crash rates with previous releases
  • Comparing bundled and over-the-air update adoption
expo/skills29982026年10月22日 更新

查看 expo 的全部技能

报告此技能的问题