Skip to main content
The run-ios command builds your iOS app and runs it on a simulator or connected device.

Usage

This command is only available on macOS with Xcode installed.

Options

Examples

Basic Usage

Builds and runs on the default iPhone simulator.

Specific Simulator

List available simulators:

iPad Simulator

Specific iOS Version

Physical Device

Running on a physical device requires:
  • Apple Developer account
  • Device registered in Xcode
  • Valid provisioning profile

Release Build

Or using configuration:

Custom Scheme

Useful when you have multiple schemes in Xcode.

Custom Metro Port

Without Packager

Use when Metro is already running.

Verbose Output

Shows detailed Xcode build logs.

Build Configurations

Debug (Default)

  • Developer menu enabled
  • Fast Refresh enabled
  • Connects to Metro bundler
  • Not optimized

Release

  • Optimized build
  • JavaScript bundled in app
  • No developer tools
  • Requires signing

Common Workflows

First Time Setup

1

Install CocoaPods dependencies

2

Run on simulator

Running on Physical Device

1

Open in Xcode

2

Configure signing

  1. Select your project in the navigator
  2. Select your target
  3. Go to Signing & Capabilities
  4. Select your Team
  5. Ensure Automatically manage signing is checked
3

Connect device

Connect your iPhone/iPad via USB and trust the computer.
4

Run the app

Using Multiple Schemes

If you have multiple schemes (e.g., Development, Staging, Production):

Device Selection

List Available Simulators

Output:

List Connected Devices

Run on Specific UDID

Environment Variables

Custom Port

Skip Pod Install

Troubleshooting

Command Not Found

Error: Command 'run-ios' not found Solution: Ensure you’re in a React Native project directory and have installed dependencies:

Xcode Not Found

Error: xcodebuild: error: SDK "iphoneos" cannot be located Solution:

CocoaPods Not Installed

Error: CocoaPods is not installed Solution:

Simulator Won’t Launch

Error: Simulator specified not found Solution:

Build Failed

Error: Various build errors Solution:

Cannot Connect to Metro

Error: Red screen “Could not connect to development server” Solution:

Signing Errors

Error: Code signing is required Solution:
  1. Open ios/YourApp.xcworkspace in Xcode
  2. Select your target
  3. Go to Signing & Capabilities
  4. Select your development team
  5. Let Xcode automatically manage signing

Module Not Found

Error: Unable to resolve module Solution:

Xcode Configuration

Custom Build Settings

Edit ios/YourApp.xcconfig:
ios/YourApp.xcconfig

Multiple Configurations

In Xcode:
  1. Select project > Info tab
  2. Under Configurations, duplicate Debug or Release
  3. Rename to your configuration (e.g., “Staging”)
  4. Run with:

Performance Tips

Enable Xcode’s new build system in Xcode preferences.Also consider:
Use Release configuration which includes optimizations:
Add to your Xcode build settings:

Advanced Usage

Custom Build Folder

Interactive Mode

Allows selecting device from a list.

Custom Terminal for Metro

Next Steps

Build iOS

Build IPA for TestFlight or App Store

iOS Logs

View device logs for debugging

Running on Device

Complete guide for physical devices

iOS Setup

Configure iOS development environment