The selected run destination is not valid for this action
XcodeIosTargetXcode Problem Overview
I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
Xcode Solutions
Solution 1 - Xcode
I had that issue several times. Basically, just set the Base SDK
in Build Settings
to Latest OS X
and it should work properly.
Solution 2 - Xcode
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
> Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
> Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Solution 3 - Xcode
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
Solution 4 - Xcode
I was facing same issue in my application and I solved it by following these steps:
- Go to Project-> Build Settings
- Change BaseSDK to Latest OS
Solution 5 - Xcode
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
Solution 6 - Xcode
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
Solution 7 - Xcode
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
- Click on the top-level project icon in the left hand panel
- In the right hand panel that appears, select Build Settings (near the top).
- Select "All" option (instead of Combined)
- Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
Solution 8 - Xcode
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
Solution 9 - Xcode
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Solution 10 - Xcode
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
Solution 11 - Xcode
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
Solution 12 - Xcode
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
Solution 13 - Xcode
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Solution 14 - Xcode
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
Solution 15 - Xcode
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to: XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
Solution 16 - Xcode
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.