[ Documentation ]
Wrapping an Existing App

Wrapping an Existing App

Peach works with existing React Native apps without app code changes. Start the app the way you already do, then connect to its dev server with peach open after the standalone install.

Basic usage

Start your app normally:

terminal
# Expo
expo start
# bare React Native / Metro
react-native start
# One
bun dev

Then connect Peach to the running dev server:

terminal
peach open 8081

If you omit the port, peach open scans for likely React Native dev servers and lets you pick one.

Checking compatibility

Before you wire a project into Peach, check it:

terminal
peach doctor

It reports the React and React Native versions, each package’s support with its implementation percent, and native code Peach does not know with the stubs that answer it. Diagnosing your project explains each finding.

Handling unsupported packages

Option 1: noop stub

For packages you do not need in the simulator:

import { defineConfig } from 'peachsim/config'
export default defineConfig({
modules: {
'react-native-analytics': 'noop',
},
})

Option 2: custom stub

For packages that need real behavior:

// stubs/my-camera.ts
export function takePicture() {
return { uri: 'https://reactnative.dev/img/tiny_logo.png' }
}
import { defineConfig } from 'peachsim/config'
export default defineConfig({
modules: {
'react-native-camera': { file: './stubs/my-camera.ts' },
},
})

Option 3: inline stub

For simple key-value packages:

import { defineConfig } from 'peachsim/config'
export default defineConfig({
modules: {
'react-native-config': {
inline: { API_URL: 'http://localhost:3000' },
},
},
})

Native Swift and Kotlin projects

If you are opening a standalone Swift / SwiftUI project or an Android Kotlin / Jetpack Compose project rather than a React Native bundle, run peach swift or peach kotlin directly against the project folder:

terminal
# Swift / SwiftUI project, SwiftPM package, or single .swift file
peach swift ./MyApp
# Android / Jetpack Compose project or single .kt file
peach kotlin ./app