Skip to content

run-ios fails with "container:VitaSantiSpa.xcodeproj does not exist" when using Xcode 16, but build works in Xcode #2690

@leoquintara

Description

@leoquintara

Environment
React Native: 0.80.1
@react-native-community/cli: latest
CocoaPods: 1.16.2
Xcode: 16
macOS: latest
Problem
When running npx react-native run-ios --simulator 'iPhone 15 Pro' (or via yarn script), the CLI fails with:

xcodebuild: error: '/path/to/project/ios/container:VitaSantiSpa.xcodeproj' does not exist.
The workspace and project files do exist in the correct location.
The is standard in
contents.xcworkspacedata
.
Compiling and running the app from Xcode works perfectly (simulator and device).
This only happens with the CLI (run-ios), not with Xcode.
What I tried
Cleaning DerivedData, Pods, node_modules, and reinstalling everything.
Regenerating workspace and pods.
Verifying no duplicate or broken references in .xcworkspace or
.xcscheme
.
Using both "latest" and fixed versions of the CLI.
Expected behavior
The CLI should resolve the project path correctly and launch the app in the simulator, as it does when running from Xcode.

Actual behavior
The CLI tries to resolve the project as /path/to/project/ios/container:VitaSantiSpa.xcodeproj (with the container: prefix), which does not exist as a real file path, and fails with exit code 66.

Steps to reproduce
Use React Native 0.80.x with Xcode 16 and CocoaPods 1.16.2.
Run npx react-native run-ios --simulator 'iPhone 15 Pro' in a project with a standard workspace/project structure.
Observe the error regarding the non-existent container:VitaSantiSpa.xcodeproj.
Additional info
This seems to be a regression or incompatibility with Xcode 16 and/or recent CLI versions.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions