Xcode: No Scheme

Xcode

Xcode Problem Overview


I recently opened project in Xcode is now saying I have No Scheme: enter image description here

When I try and Manage Schemes I am unable to Autocreate Schemes Now (a separate post but possibly related) and no Schemes are listed: enter image description here

and when I try and add a Scheme I get dialog saying Target None. enter image description here

What's going on and how do I fix my Xcode project?

Xcode Solutions


Solution 1 - Xcode

Close Xcode and delete the folder <username>.xcuserdatad from within <projectname>.xcodeproj/xcuserdata/. Then restart Xcode, the schemes should re-appear.

EDIT: You may need to delete from .xcodeproj file and .xcworkspace file

Solution 2 - Xcode

This worked for me

  1. Click on No Scheme
  2. Click on Manage Scheme
  3. Click on Autocreate Schemes Now

Solution 3 - Xcode

I think this is happening when you are opening the app.xcworkspace not app.xcodeproj.

Solution: Install the pod and open the app.xcworkspace again.

Solution 4 - Xcode

  1. Close Xcode ["Force Quit Applications" (cmd+option+escape) to ensure]
  2. Remove derived data of app (Xcode 9.4: Users/[username]/Library/Developer/Xcode/DerivedData/[app directory to delete])
  3. Remove .xcworkspace from project directory
  4. Also in project directory: .xcodeproj -> Right Click -> Show Package Contents -> remove .xcworkspace if exist -> xcuserdata -> remove [username].xcuserdatad

It should do the trick. Install pods if needed and open project. Target should be available again.

Solution 5 - Xcode

Use shortcut ctrl+cmd+[ or restart.

Solution 6 - Xcode

For me following worked
Go to your Project Directory and right click on the

> .xcodeproj or .xcworkspace file and select Show Package Content

and delete xcuserdata.
don't forget to restart the Xcode

  • If it do not work and you have CocoPod in your project run the following Command

> Pod install

Solution 7 - Xcode

The top answer fix didn't work for me when running the Xcode 8 beta's. but what did work was unplugging a connected device (iPhone, iPad etc.) and re plugging back in. The schemes would then reappear.

Solution 8 - Xcode

If you are using pods and using the correct workspace what I found to work best is simply open up terminal run pod update restart Xcode and every time it fixed the problem for me.

Solution 9 - Xcode

Firstly,when you are using Cocoapods to Develop iOS projects,you need to open the project with .xcodeworkspace file instead of .xcodeproj file.

enter image description here

Secondly you can Show Package Contents with .xcworkspace file,you will find the contents.xcworkspacedata file.

enter image description here

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "group:BluetoothColorLamp24G.xcodeproj">
   </FileRef>
   <FileRef
      location = "group:Pods/Pods.xcodeproj">
   </FileRef>
</Workspace>

pay attention to this line:

location = "group:BluetoothColorLamp24G.xcodeproj"

The .xcworkspace file has reference with the .xcodeproj file.

>If you find there is no file or wrong path about the location,you can link to your .xcodeproj file,which works for me.

Development Environment:

macOS 10.14
Xcode 10.1

Solution 10 - Xcode

For me, I switched to a different Macbook. Running pod update fixed everything for me.

Solution 11 - Xcode

I will add to this answer::: From @Chris Miles.

Close Xcode and delete the folder <username>.xcuserdatad from within <projectname>.xcodeproj/xcuserdata/. Then restart Xcode, the schemes should re-appear.

Close Xcode, and everything, about ios development like simulators, then run again you pod install if you are using cocoa pods.

That's works for me.

Solution 12 - Xcode

This answer is for people who tried everything in the answers and still did not fix the issue:

Your solution is git checkout mainline. Because you probably played around with xcodeproj file and its broken now..

Solution 13 - Xcode

I have Removed pod completely from my project and adding it again.. retrieved my target and all

Solution 14 - Xcode

In my case the cause was renaming the project so I went to Manage Schemas and created the App Schema again (+ button).

Solution 15 - Xcode

In my case I missed }; in project.pbxproj after resolving conflicts

Solution 16 - Xcode

If you change the Major Name Change off/in your project in the past and after that deleted the Xcode and its data, You will see this issue. When You will clone this project on other device.You will see same issue. To fix this, go to your pod file, update the target name and install the pods again.

Solution 17 - Xcode

None of the above worked for me. My solution was to look at the project file differences in text mode and I found that VALID_ARCHS got reset in two places (VALID_ARCHS = ""). Restoring the proper settings for VALID_ARCHS, also restored back the Schemes.

Solution 18 - Xcode

This commonly occurs when you install a Cocoapod, and try building and running from your workspace without first closing your project. If this is the case, quit Xcode, then open your app from your workspace and it should be fine.

Solution 19 - Xcode

In my case I rebranched to develop and then the window appeared if I want to resave my project. I must have clicked "close" though. Anyways, I lost my scheme and what helped was rebranching to some other branch, then back to develop and resave how I was supposed to do in the first place

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSnowcrashView Question on Stackoverflow
Solution 1 - XcodeChris MilesView Answer on Stackoverflow
Solution 2 - XcodegaboView Answer on Stackoverflow
Solution 3 - XcodeDhanas ManianView Answer on Stackoverflow
Solution 4 - XcodeSzuwar_JrView Answer on Stackoverflow
Solution 5 - XcodepbaranskiView Answer on Stackoverflow
Solution 6 - XcodeSultan AliView Answer on Stackoverflow
Solution 7 - XcodeRon MyschukView Answer on Stackoverflow
Solution 8 - XcodeHajji DaoudView Answer on Stackoverflow
Solution 9 - XcodeifeegooView Answer on Stackoverflow
Solution 10 - Xcodetemp_View Answer on Stackoverflow
Solution 11 - XcodeCristian Camilo Pérez CardonaView Answer on Stackoverflow
Solution 12 - XcodeWill GwoView Answer on Stackoverflow
Solution 13 - Xcodesathya chinnasamyView Answer on Stackoverflow
Solution 14 - XcodeCristianMoiseiView Answer on Stackoverflow
Solution 15 - XcodeMaxim GolovlevView Answer on Stackoverflow
Solution 16 - XcodeAsifHabibView Answer on Stackoverflow
Solution 17 - XcodeSergey KamenskyView Answer on Stackoverflow
Solution 18 - XcodeScottyBladesView Answer on Stackoverflow
Solution 19 - Xcodealeksy.tView Answer on Stackoverflow