Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native run-ios with .xcworkspace

react-native run-ios --project-path 'ios/myProject.xcworkspace' --simulator=\"iPhone 8 Plus\"

Specifying the project path to the .xcworkspace file fails Could not find Xcode project files in ios folder

I've seen that this is an item proposed in the React Native roadmap: https://react-native.canny.io/feature-requests/p/specifying-the-xcworkspace-to-be-used-in-the-command-line-options

Is there a way (right now) to use Cocoapods with React Native and run with the command line? I'm aware that it works perfectly fine when building through xcode.

Thanks

like image 967
Paul Brittain Avatar asked Oct 28 '25 01:10

Paul Brittain


1 Answers

You should just be able to run it without --project-path. You would use --project-path to specify ios (the folder containing both .xcworkspace and .xcodeproj. Then the CLI will automatically pick .xcworkspace if it exists, otherwise it will pick .xcodeproj. When you start you should get a message like this:

Found Xcode workspace myProject.xcworkspace

like image 113
redbmk Avatar answered Oct 30 '25 15:10

redbmk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!