'Xcode: No Scheme
I recently opened project in Xcode is now saying I have No Scheme:

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

and when I try and add a Scheme I get dialog saying Target None.

What's going on and how do I fix my Xcode project?
Solution 1:[1]
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:[2]
This worked for me
- Click on No Scheme
- Click on Manage Scheme
- Click on Autocreate Schemes Now
Solution 3:[3]
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:[4]
- Close Xcode ["Force Quit Applications" (cmd+option+escape) to ensure]
- Remove derived data of app (Xcode 9.4: Users/[username]/Library/Developer/Xcode/DerivedData/[app directory to delete])
- Remove .xcworkspace from project directory
- 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:[5]
Use shortcut ctrl+cmd+[ or restart.
Solution 6:[6]
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:[7]
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:[8]
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:[9]
Firstly,when you are using Cocoapods to Develop iOS projects,you need to open the project with .xcodeworkspace file instead of .xcodeproj file.
Secondly you can Show Package Contents with .xcworkspace file,you will find the contents.xcworkspacedata file.
<?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
.xcodeprojfile,which works for me.
Development Environment:
macOS 10.14
Xcode 10.1
Solution 10:[10]
For me, I switched to a different Macbook. Running pod update fixed everything for me.
Solution 11:[11]
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:[12]
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:[13]
I have Removed pod completely from my project and adding it again.. retrieved my target and all
Solution 14:[14]
In my case the cause was renaming the project so I went to Manage Schemas and created the App Schema again (+ button).
Solution 15:[15]
In my case I missed }; in project.pbxproj after resolving conflicts
Solution 16:[16]
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:[17]
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:[18]
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:[19]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow


