Created attachment 16869 [details]
The SDK target settings in the Mac addin/MSBuild target is confusing and a little out of date. Given that for a while now Xcode releases only ship with the latest SDK release, there is no reason to offer SDK choice in the Mac build settings.
For example, we target 10.10, but Xcode 8 only provides 10.12 SDK. This is okay! However, the target cannot find the 10.10 SDK, and claims it will use the latest (10.12) instead. This is alarming. It implies that the app binary will be built for 10.12, and not 10.10.
> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets: warning : The MacOSX SDK version '10.10' is not installed. Using newer version '10.12' instead'.
However, the only value that effectively matters is the SDK version in the Info.plist. This value is correctly passed to mmp, and then on to clang to become -mmacosx-version-min=10.10.
The reality is that nothing is wrong, but there's a UI that controls a useless setting, and produces a scary warning.
So... my proposal is the following:
1. ensure that XS, the XM build targets/tasks, and mmp use the Xcode located at `xcode-select -p` - I think this is already the case, but it would probably be a good idea to confirm that. It's a good/standard policy.
2. Remove the MacOSXSdkVersion project option altogether. This was used only to try to locate the SDK directory inside an Xcode installation. Given that (a) we should only use the Xcode resolved by (1) and (b) that Xcode ships with exactly one SDK, this option is pointless.
3. Remove the associated UI for manipulating MacOSXSdkVersion inside the XS build pane.
The Info.plist UI is already correct in that it offers 10.7 through the latest version provided by the SDK found in the Xcode resoled by (1).
MSBuild changes required for this fix: https://github.com/xamarin/xamarin-macios/pull/528
XS change: md-addins commit 19d124b6f4568a7ce8f261bae4a6e6aa7f9a5cab
Fixed in version 188.8.131.5201 (cycle8)
Author: Jeffrey Stedfast
Commit: ebe65cf5c35eeb29044578940e4568d7f3b470e0 (xamarin/md-addins)
Included in Commit: d728db2d8c210fe772cf1ebf4ac7f518165ac960 (mono/monodevelop)