change minimum deployment target in xcode

I'm using Xcode with a project with an external build system.


I'm trying to have xcode build and run the project, instead of going through my current workflow which involves attaching to an externally launched process.


However, xcode is getting in my way and saying it can't run the project because the target's PC LOAD LETTER "minimum deployment target" setting is set to 10.13, but I haven't upgraded yet. All the instructions for changing it say to go to the target's "General" tab is the project settings and change it there, but my target doesn't have a "General" tab.


Really frustrated with this. Xcode does some things very well, but it's soooo cumbersome and painful to set up.

Another user suggested creating a new project with an iOS template, but then he deleted his comment after I suggested this was an ineffective solution. I hope I didn't offend him!


Anyway, I tried going through the files in the xcode project folder (not the source files, just the files xcode creates for the project) to see if there was some hardcoded value there I could edit, but no joy.


One other thing I might add is that there's a "Deployment Target" box in the "info" tab of the project settings. It has one field, "macOS deployment target" with a dropdown next to it, but the dropdown has no options. The dropdown field can be typed into. The text in the dropdown field initially said "Default" in grey. I tried setting it to 10.12.6, and then 10.8, and then 1 and other things, but I still got the same error when trying to launch my project.

Is this an "External Build System" target? You might need to create a new app target for the workflow that builds and runs via Xode.

The Info tab of the project settings is basically a default for all targets for which it's meaningful. If the individual target doesn't have this setting, you can assume it doesn't use it.


Since my earlier response crossed wires with this post, can you let us know what kind of target you're trying to build and run within Xcode?

It's an External Build System target. Not sure what you mean about new app target? As far as I can tell, XCode is correctly building the right executable, and trying to launch it, but fails to launch because of this issue. Any ideas for things I can try (short of upgrading)?

For a EBS target, there's no General tab, because Xcode doesn't know how to translate the things that are usually in the General tab to command-line arguments (or whatever the build system needs to specify settings).


Therefore, if you want to run the EBS target, you have to find an external way of providing the command-line arguments you need. I'm sorry, I don't know what that build system is, so I can't get any more specific.


(However, if you create a sample project that builds a normal app with Xcode's normal build system, you could look at the build transcript to see what command-line options Xcode passed to the compiler, which may help you figure out what you need.)


The response about a new app target would apply in the case that you want "build in Xcode" in the sense of use the Xcode build system instead of the external one. However, it doesn't seem like that's what you meant, so never mind.

I'm a little confused, because I can run the app from the terminal, and even from finder just fine. I don't get any issues. When I build it within xcode, it's using my external build system so it's doing the same thing as I do when I build in the terminal. Given that there's no difference in the build, why would I be able to run outside of xcode but not within xcode?

Seen this SO thread?

https://stackoverflow.com/questions/26257278/running-makefile-based-c-project-in-xcode-6-on-os-x-10-9

(after any change, be sure to use the Product menu w/the option key pressed and choose to 'clean build folder' so that Xcode reindexes with your changes, a process which may have the same effect as recreating the target, only w/less work, perhaps).


Still no joy, you might need to add/confirm the MDOS value in your makefile (?).

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html


Otherwise, it might be time to eval your IDE.


Good luck.

It's a good question, and I don't have an answer. My suggestion is, again, to go the build transcripts, and look for differences between the build of (say) a specific source file.


One possibility is which SDK version you're building against. (This is different from the deployment target version.) I noticed that Xcode does have a SDKROOT setting in the Build Settings tab for a EBS target, which I assume defaults to the SDK inside the Xcode app bundle (which is going to the 10.13 SDK for current Xcode versions).


This would only affect the build if Xcode somehow passes setting through to the build system (e.g. via environment variables).


So, really, your first task is to find out if Xcode is causing your executable to be built differently (with different settings) or just run differently. Again, build transcripts are the place to start.

change minimum deployment target in xcode
 
 
Q