14

Just downloaded Xcode and I am trying to run a simple C++ file to make sure everything works and whenever I try to run the .cpp file I am given this: "The run destination My Mac is not valid for Running the scheme 'Scheme_Name'.

4
  • 1
    just set the SDK to MacOS X 10.6.
    – pkc456
    Oct 13, 2015 at 5:36
  • 1
    @pkc456 How do I set the SDK?
    – timtour97
    Oct 13, 2015 at 18:33
  • 1
    1) Click on the project icon in the left hand panel. 2)select Build Settings » all. 3) You'll see the option to change the SDK. img546.imageshack.us/img546/9808/picture3fh.png
    – pkc456
    Oct 14, 2015 at 4:27
  • I can only set the SDK to "macOS", I'm not able to set a version of macOS. I'm using Xcode 10.1 (10B61). The error persists with this setting. Feb 3, 2019 at 2:06

2 Answers 2

45

happened the same to me with a project I downloaded. In my case, the solution was to change the "Base SDK" to the latest OS X in the Build Settings.

To do so, click on the project name in the navigator on the left, then on Build Settings and in the main window you should look for Base SDK.

If Base SDK does not show, ensure that "All" is selected in the filter at the top of the page.

Base SDK set to 10.10 in this example

3
  • hm, i'm having these exact symptoms with a Library project of my own, and after xcode 7 the library won't archive w/ this same message. I also had osx10.9 in the settings, but bumping it to latests isn't helping. Dec 18, 2015 at 20:07
  • oh, I see my problem. My library has multiple targets and I was setting the Base SDK on the wrong target. this works. thank you. Dec 18, 2015 at 20:15
  • 3
    For possible other Xcode newbies like myself, I'll elaborate on @orionelenzil 's comment above - the "targets" are shown in a drop-down on the topmost toolbar in the above screen shot, over near the left end. (Blurred out in the above screen shot.)
    – RenniePet
    Dec 7, 2016 at 21:32
2

In my case, I had the same issue when I duplicated and renamed a project. I solved by setting the Build Target in the Scheme Edit view. enter image description here

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.