6

I'm working on a React Native app that I'm upgrading from 0.59 to 0.60. I have cocoapods sorted out, and I can build and run the app from Xcode in a simulator successfully. However, when I try to run the app using react-native run-ios --scheme "app" I get an error:

xcodebuild: error: The workspace named "app" does not contain a scheme named "app". The "-list" option can be used to find the names of the schemes in the workspace.

I have an app.xcworkspace file, which I'm opening in Xcode. I've shared the "app" scheme in the Manage Schemes dialog, and set its Container to the workspace.

Xcode has created the file ios/app.xcworkspace/xcshareddata/xcschemes/app.xcscheme.

When I run xcodebuild -workspace app.xcworkspace -list I see:

Information about workspace "app":
    Schemes:
        app
        app-tvOS
        boost-for-react-native
        DoubleConversion
        Folly
        glog
        Pods-app
        Pods-app-tvOS
        Pods-app-tvOSTests
        Pods-appTests
        React
        React-Core
        ...

Previously, the react-native run-ios command worked fine, but since the upgrade it's failing with this error.

Matt Anderson
  • 111
  • 2
  • 5

2 Answers2

0

If the name of your app has changed in React Native, you can update the scheme name in XCode by following the instructions here.

  1. Choose "Edit Scheme" from the "Product" menu.
  2. Click on the "Manage Schemes…" button
  3. Select the scheme whose name you wish to change
  4. Press the "Return" key and enter the new name.
xrsbm
  • 1
-2

use terminal to re-install pods, and should be fixed open terminal

$: cd iOS
$: pod install
unijad
  • 163
  • 1
  • 4