UE4 Forcing Mac OS Deployment Target

There are several c++ libraries that aren’t available before OS 10.12 and after hours of figuring out why XCode was not letting me use these libraries I realized that somewhere in the engine code Unreal has a deployment target hardcoded. This is really inconvenient and changing these settings in my XCode build settings doesn’t really seem to do anything. I know it’s unreal since I’ve created a couple blank projects in XCode which are compiling fine using the same libraries.
If anyone else has face this issue I would be forever grateful for a solution. Thanks.

After spending all day on this digging through the source code I found the answer. You need to change MacToolChain.cs and set MacOSVersion and MinMacOSVersion to the OS version of your choice, and then rebuild the engine from source. It will not work if you don’t build from source since the variable is passed in through cmake.