Catalog
expo/expo-brownfield

expo

expo-brownfield

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.

NewUpdated Oct 3, 2026

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:

Approach What ships to the native app When to choose
Isolated Prebuilt AAR / XCFramework Native team doesn't need Node or RN tooling; RN code can live in a separate repo
Integrated React Native sources added to the existing Gradle / CocoaPods build One 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 submit-expo-feedback@latest --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 AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.

Files8
8 files · 74.5 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

82

Quality

92

Clarity

88

Completeness

85

Summary

A comprehensive guide for integrating Expo and React Native into existing native iOS and Android apps using two distinct architectures: isolated (prebuilt AAR/XCFramework) and integrated (direct source addition). Covers project inspection, architecture selection, native build configuration, feature wiring, lifecycle management, troubleshooting, and version compatibility. The skill provides detailed reference documentation, decision matrices, and working code examples for both SwiftUI/UIKit and Kotlin/Android integration patterns.

Static Analysis Findings

1 finding

Patterns detected by deterministic static analysis before AI scoring. Hover over any finding code for detailed information and remediation guidance.

Credential Exposure
SEC-020Direct .env File Access9x in 1 file

Direct .env file access

references/brownfield-integrated.md.env9x

Detected Capabilities

file readcode examplesbuild configurationgradle setupcocoapods setupswift codekotlin codetypescript codeframework linkingpackage dependency managementnative module registrationlifecycle forwardingmessaging/event handling

Trigger Keywords

Phrases that agents use to match this skill to user intent.

embed react native screenbrownfield integrationadd expo to native appxcframework packagingaar library integrationmetro in native appisolated vs integratedswift ui react nativekotlin compose integrationios android brownfield

Risk Signals

INFO

Direct .env file access referenced in brownfield-integrated.md

references/brownfield-integrated.md
INFO

References to environment variables for build configuration (PROJECT_ROOT, NODE_BINARY, EXPO_PROJECT_ROOT, etc.)

references/brownfield-integrated.md, brownfield-isolated.md
INFO

Maven repository configuration with optional credential variables (ARTIFACTORY_URL, ARTIFACTORY_USER, ARTIFACTORY_TOKEN)

references/brownfield-isolated.md

Referenced Domains

External domains referenced in skill content, detected by static analysis.

docs.expo.devexpo.devgithub.commaven.example.comwww.jitpack.iowww.npmjs.com

Use Cases

  • Add React Native screen to existing iOS app
  • Embed Expo features in native Android app
  • Package React Native as XCFramework for native teams
  • Build React Native AAR for Android host app
  • Choose between isolated and integrated brownfield architecture
  • Wire native navigation with React Native screens
  • Handle lifecycle events in brownfield integration
  • Debug Metro connection in brownfield setup
  • Upgrade Expo SDK in existing native projects
  • Share state between native and React Native layers

Quality Notes

  • Excellent structure with clear decision matrix (comparison.md) helping developers choose the right approach upfront
  • Rich code examples in multiple languages (Swift, Kotlin, TypeScript) showing both UIKit/SwiftUI and Android patterns
  • Comprehensive version compatibility table mapping SDK versions to native requirements, toolchain versions, and build defaults
  • Well-organized references covering isolated, integrated, feature integration, troubleshooting, and version alignment separately
  • Clear guardrails documented: preserving hand-maintained native code, not running prebuild on integrated hosts, explicit lifecycle forwarding
  • Detailed troubleshooting guide addresses common cross-cutting issues (Metro connection, missing modules, architecture mismatches, monorepo setup)
  • Pre-integration checklist (Inspect the host first) prevents common mistakes
  • Feature integration guide includes acceptance scenario with explicit testing steps (open, input, result, dismiss, reopen, release build)
  • Explicit notes on team/repo structure impact on architecture choice minimize misalignment
  • Security consideration: documented credential handling for private Maven repositories uses environment variable indirection
  • Monorepo guidance repeated across integrated, isolated, and troubleshooting references for consistency
Model: claude-haiku-4-5-20251001Analyzed: Oct 3, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v3.0

    Contract changed: description

    ✦ AIRemoves OSS framework label from skill description.

    triggering2026-10-03

    LATEST
  2. v2.0

    Contract changed: description

    ✦ AIRefocuses skill scope: excludes eas-app-stores tasks, adds feature integration pattern, requires host app inspection and Release-mode testing.

    triggering2026-09-11

    View This Version
  3. v1.1

    Content updated

    ✦ AIAdds feedback submission guidance with npx command for reporting skill errors or outdated content.

    2026-09-09

    View This Version
  4. v1.0

    2026-07-11

    View This VersionInitial version

Use expo/expo-brownfield in your dev environment

Command Palette

Search for a command to run...