Xcode: No Scheme
XcodeXcode Problem Overview
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?
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
- Click on No Scheme
- Click on Manage Scheme
- 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
- 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 - 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.
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 .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