No devices because the active scheme has no targets

Viewed 7597

I have recently changed the name of my project in Xcode, and there seems to be an issue. When I try to select a device/simulator, I get the error: No devices because the active scheme has no targets. An image of the error is below.

IMAGE

Does anyone know the solution to this error?

2 Answers

If somehow you want to proceed and save your new project name, make sure:

  1. Make sure the project files can be read from xCode [Check for any possible path changes regarding with the new name]
  2. [If not] Set the info.plist to your current target's Build Settings
  3. [If target name has changed and you had already installed pods] Edit the Podfile target and set it to your new target name. Run "pod deintegrate" and pod install then.
  4. Clear Derived Data
  5. Open your project.xcworkspace, Edit Scheme -> Run -> Executable -> Set your target
  6. Build or Run

changing iOS project name in Xcode 13

  1. Go to project file inspector.
  2. Under Identity and type change the old name with new name.
  3. Xcode confirmation popup will be displayed and click save changes.
  4. If pod already Installed, got to podfile and change the target to new name.
  5. Change the target modules path if used.
  6. clean build folder and run.

or Just change the product name in build settings of Target App.

Related