Skip to content

Commit

Permalink
Bump to use Xcode 10 beta 1 (dotnet#4179)
Browse files Browse the repository at this point in the history
* Bump to use Xcode 10 beta 1

* Update Versions.plist

* Add a dependency on Xcode 9.4.

* [msbuild] Fix build with Xcode 10 beta 1. (dotnet#4182)

Many years ago (in Xcode 7 according to code comment)
Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped
by looking at Developer/usr instead (and also the subsequent code to locate
the bin directory was based on the location of the usr directory).

Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10
beta 1, but it seems useless (for one it doesn't contain a bin directory), so
in order to try to keep things sane don't look for this directory in Xcode 10
and instead go directly for Developer/usr (which is what we've been using as
the usr directory for years anyway).

Fixes this problem when building apps with Xcode 10 beta 1:

      /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj]

* [runtime] Build 32-bit mac executables using Xcode 9.4.

* [mtouch] Work around broken tvOS headers in Xcode 10 beta 1.

* [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode.

* Use version-agnostic paths to sdk directories.

* [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors

* [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes dotnet#4001 (dotnet#4022)

* [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes dotnet#4001

This was fixed in macOS 10.13.4

dotnet#4001

* [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later

* [xharness] Fix permission dialog suppression in Xcode 10.

* [xharness] Ignore 32-bit macOS tests by default.

* [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit.

* [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode.

* [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697).

* [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap.

* [tests] Fix some protocol changes (public or not) find by introspection tests

* [tests][intro] Fix DefaultCtorAllowed failures

* [Intents] Obsolete several Intents classes in watchOS.

Several existing Intents classes have been marked as unavailable in watchOS in
the headers in Xcode 10 beta 1, and corresponding tests are now failing.

So obsolete the managed wrapper types, and fix tests accordingly.

* Fix xtro wrt previous Ietents/intro changes

* [tests] Minor adjustments to mtouch tests to work with Xcode 10.

* [msbuild] Update tests to cope with additional files produced by the Core ML compiler.

* [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it.

Also update tests accordingly.

* [coreimage] Stub new filters and exclude ?removed? ones from tests

* Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests)

* [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files)

* [tests] Fix intro 32bits testing for filters resutls

* [msbuild] Slightly change error message to be better English.
  • Loading branch information
spouliot authored Jun 9, 2018
1 parent 847f4c1 commit 2d6ce74
Show file tree
Hide file tree
Showing 243 changed files with 6,241 additions and 481 deletions.
47 changes: 28 additions & 19 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
# on wrench, because wrench technically builds hashes, not branches)
#
#
PACKAGE_HEAD_BRANCH=d15-7
PACKAGE_HEAD_BRANCH=xcode10
ifeq ($(BUILD_REVISION),)
CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD)
else
Expand All @@ -42,22 +42,27 @@ endif

# TODO: reset to 0 after major/minor version bump (SRO) and increment for service releases and previews
# Note: if not reseted to 0 we can skip a version and start with .1 or .2
PACKAGE_VERSION_REV=1
PACKAGE_VERSION_REV=0
IOS_PACKAGE_VERSION_REV=0

IOS_PRODUCT=Xamarin.iOS
IOS_PACKAGE_NAME=Xamarin.iOS
IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
# NEVER customize IOS_PACKAGE_VERSION itself, other parts (mtouch, web updater) are using the IOS_PACKAGE_VERSION_* variables
IOS_PACKAGE_VERSION=11.12.$(IOS_PACKAGE_VERSION_REV).$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=11.99.$(IOS_PACKAGE_VERSION_REV).$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))

XCODE_VERSION=9.4
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode94.app/Contents/Developer
# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=10.0
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_10_Beta.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode10-beta1.app/Contents/Developer

XCODE94_VERSION=9.4
XCODE94_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip
XCODE94_DEVELOPER_ROOT=/Applications/Xcode94.app/Contents/Developer

# Minimum Mono version
MIN_MONO_VERSION=5.10.0.0
Expand All @@ -83,10 +88,10 @@ MIN_OSX_BUILD_VERSION=10.12
MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11

IOS_SDK_VERSION=11.4
OSX_SDK_VERSION=10.13
WATCH_SDK_VERSION=4.3
TVOS_SDK_VERSION=11.4
IOS_SDK_VERSION=12.0
OSX_SDK_VERSION=10.14
WATCH_SDK_VERSION=5.0
TVOS_SDK_VERSION=12.0

MIN_IOS_SDK_VERSION=6.0
MIN_OSX_SDK_VERSION=10.7
Expand Down Expand Up @@ -115,11 +120,15 @@ else
APPLETLS_DEFINES = -d:XAMARIN_APPLETLS
endif

XCODE_MAC_SDKROOT=$(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(OSX_SDK_VERSION).sdk
XCODE_MAC_SDKROOT=$(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
XCODE94_MAC_SDKROOT=$(XCODE94_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

MAC_CC=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC_CXX=$(CCACHE)$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)

MAC32_CC=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)
MAC32_CXX=$(CCACHE)$(XCODE94_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -isysroot $(XCODE94_MAC_SDKROOT) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)

# This is the temporary directory where the various builds are installed
BUILD_DESTDIR=$(abspath $(TOP)/builds/install)
MAC_INSTALL_VERSION ?= git
Expand Down Expand Up @@ -166,9 +175,9 @@ BITCODE_CFLAGS=-fembed-bitcode-marker
MIN_IOS_SDK_VERSION=9.0
endif

SIMULATOR_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(IOS_SDK_VERSION).sdk
SIMULATOR_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk

OBJC_CFLAGS=-ObjC++ -std=c++0x -fno-exceptions
OBJC_CFLAGS=-ObjC++ -std=c++0x -fno-exceptions -I$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1

COMMON_SIMULATOR_CFLAGS=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(SIMULATOR_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
SIMULATOR86_CFLAGS=$(COMMON_SIMULATOR_CFLAGS) -arch i386
Expand All @@ -191,7 +200,7 @@ WATCH_CSC=$(SYSTEM_CSC) -nostdlib -noconfig -r:$(WATCH_BCL_DIR)/System.dll -r:$(

DEVICE_OBJC_CFLAGS=$(OBJC_CFLAGS) $(BITCODE_CFLAGS)

DEVICE_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
DEVICE_SDK=$(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
DEVICE7_CFLAGS= -arch armv7 -mno-thumb -miphoneos-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(DEVICE_SDK) $(CFLAGS) $(IOS_COMMON_DEFINES)
DEVICE7S_CFLAGS=-arch armv7s -mno-thumb -miphoneos-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(DEVICE_SDK) $(CFLAGS) $(IOS_COMMON_DEFINES)
DEVICE64_CFLAGS=-arch arm64 -miphoneos-version-min=7.0 -isysroot $(DEVICE_SDK) $(CFLAGS) $(IOS_COMMON_DEFINES)
Expand All @@ -210,11 +219,11 @@ XAMARIN_IPHONEOS_SDK = $(MONOTOUCH_DEVICE_SDK)
XAMARIN_WATCHSIMULATOR_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.WatchSimulator.sdk
XAMARIN_WATCHOS_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.WatchOS.sdk

SIMULATORWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator$(WATCH_SDK_VERSION).sdk
SIMULATORWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk
SIMULATORWATCH_CFLAGS = -arch i386 -mwatchos-simulator-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(SIMULATORWATCH_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
SIMULATORWATCH_OBJC_CFLAGS = $(SIMULATORWATCH_CFLAGS) $(COMMON_SIMULATOR_OBJC_CFLAGS)

DEVICEWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS$(WATCH_SDK_VERSION).sdk
DEVICEWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk
DEVICEWATCH_CFLAGS = -arch armv7k -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) $(CFLAGS) -fembed-bitcode $(IOS_COMMON_DEFINES)
DEVICEWATCH_OBJC_CFLAGS = $(DEVICEWATCH_CFLAGS) $(DEVICE_OBJC_CFLAGS)

Expand All @@ -223,11 +232,11 @@ DEVICEWATCH_OBJC_CFLAGS = $(DEVICEWATCH_CFLAGS) $(DEVICE_OBJC_CFLAGS)
XAMARIN_TVSIMULATOR_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.AppleTVSimulator.sdk
XAMARIN_TVOS_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.AppleTVOS.sdk

SIMULATORTV_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator$(TVOS_SDK_VERSION).sdk
SIMULATORTV_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk
SIMULATORTV_CFLAGS = -arch x86_64 -mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(SIMULATORTV_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
SIMULATORTV_OBJC_CFLAGS = $(SIMULATORTV_CFLAGS) $(COMMON_SIMULATOR_OBJC_CFLAGS)

DEVICETV_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(TVOS_SDK_VERSION).sdk
DEVICETV_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk
DEVICETV_CFLAGS = -arch arm64 -mtvos-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(DEVICETV_SDK) $(CFLAGS) -fembed-bitcode $(IOS_COMMON_DEFINES)
DEVICETV_OBJC_CFLAGS = $(DEVICETV_CFLAGS) $(DEVICE_OBJC_CFLAGS)

Expand Down Expand Up @@ -263,7 +272,7 @@ MAC_PRODUCT=Xamarin.Mac
MAC_PACKAGE_NAME=xamarin.mac
MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")

MAC_PACKAGE_VERSION=4.4.$(PACKAGE_VERSION_REV).$(MAC_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=4.99.$(PACKAGE_VERSION_REV).$(MAC_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_REV=99
Expand Down
3 changes: 3 additions & 0 deletions Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<string>11.2</string>
<string>11.3</string>
<string>11.4</string>
<string>12.0</string>
</array>
<key>tvOS</key>
<array>
Expand All @@ -44,6 +45,7 @@
<string>11.2</string>
<string>11.3</string>
<string>11.4</string>
<string>12.0</string>
</array>
<key>watchOS</key>
<array>
Expand All @@ -58,6 +60,7 @@
<string>4.1</string>
<string>4.2</string>
<string>4.3</string>
<string>5.0</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
1 change: 1 addition & 0 deletions Versions-mac.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<string>10.11</string>
<string>10.12</string>
<string>10.13</string>
<string>10.14</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
3 changes: 3 additions & 0 deletions builds/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
TOP=..
include $(TOP)/Make.config

XCODE_DEVELOPER_ROOT=$(XCODE94_DEVELOPER_ROOT)
export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)

PREFIX=$(abspath $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/)

IPHONESIMULATOR_SDK=$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ void EnsureiOSSdkPath ()
// Note: Developer/Platforms/iPhoneOS.platform/Developer/usr is a physical directory, but
// Developer/Platforms/iPhoneSimulator.platform/Developer/bin has always been a symlink
// to Developer/bin and starting with Xcode 7 Beta 2, the usr symlink no longer exists.
SdkUsrPath = DirExists ("SDK Usr directory", Path.Combine (platformDir, "Developer", "usr"));
// In Xcode 10 beta 1 Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared,
// but since it seems incomplete don't even check for it.
if (AppleSdkSettings.XcodeVersion.Major < 10)
SdkUsrPath = DirExists ("SDK Usr directory", Path.Combine (platformDir, "Developer", "usr"));

if (string.IsNullOrEmpty (SdkUsrPath)) {
SdkUsrPath = DirExists ("SDK Usr directory", Path.Combine (currentSDK.DeveloperRoot, "usr"));
if (string.IsNullOrEmpty (SdkUsrPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public override bool Execute ()
version = currentSdk.GetClosestInstalledSdk (version, false);
sdk_path = currentSdk.GetSdkPath (version, SdkIsSimulator);
} else {
if (AppleSdkSettings.XcodeVersion.Major >= 10) {
Log.LogError ("Xcode 10 does not support watchOS 1 apps. Either upgrade to watchOS 2 apps, or use an older version of Xcode.");
return false;
}
if (!(AppleSdkSettings.XcodeVersion.Major > 6 || (AppleSdkSettings.XcodeVersion.Major == 6 && AppleSdkSettings.XcodeVersion.Minor >= 2))) {
Log.LogError ("An installation of Xcode >= 6.2 is required to build WatchKit applications.");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public CoreMLCompiler (string platform) : base (platform)

void AssertCompiledModelExists (string modelName)
{
var expected = new string[] { "coremldata.bin", "model.espresso.net", "model.espresso.shape", "model.espresso.weights", "model/coremldata.bin" };
var expected = new string[] { "coremldata.bin", "model.espresso.net", "model.espresso.shape", "model.espresso.weights", "model/coremldata.bin", "neural_network_optionals/coremldata.bin" };
var mlmodelc = Path.Combine (AppBundlePath, modelName + ".mlmodelc");

Assert.IsTrue (Directory.Exists (mlmodelc));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,38 @@
using NUnit.Framework;
using Xamarin.MacDev;
using System.Diagnostics;
using Xamarin.Tests;

namespace Xamarin.iOS.Tasks {
[TestFixture ("iPhone")]
[TestFixture ("iPhoneSimulator")]
public class WatchKit : ExtensionTestBase {

bool isXcode10OrLater = Version.Parse (Configuration.XcodeVersion).Major >= 10;

public WatchKit (string platform) : base(platform)
{
}

[Test]
public void BasicTest ()
{
this.BuildExtension ("MyWatchApp", "MyWatchKitExtension", Platform, "Debug", additionalAsserts: (ProjectPaths mtouchPaths) =>
this.BuildExtension ("MyWatchApp", "MyWatchKitExtension", Platform, "Debug", expectedErrorCount: isXcode10OrLater ? 1 : 0, additionalAsserts: (ProjectPaths mtouchPaths) =>
{
Assert.IsTrue (Directory.Exists (Path.Combine (mtouchPaths.AppBundlePath, "PlugIns", "MyWatchKitExtension.appex")), "appex");
Assert.IsFalse (Directory.Exists (Path.Combine (mtouchPaths.AppBundlePath, "PlugIns", "MyWatchKitExtension.appex", "Frameworks")), "frameworks");
});

if (isXcode10OrLater)
Assert.AreEqual ("Xcode 10 does not support watchOS 1 apps. Either upgrade to watchOS 2 apps, or use an older version of Xcode.", Engine.Logger.ErrorEvents[0].Message, "WK 1 error message");
}

[Test]
public void InvalidBundleIdTest ()
{
if (isXcode10OrLater)
Assert.Ignore ("WK 1 apps are not supported when running with Xcode 10+.");

var mtouchPaths = SetupProjectPaths ("MyWatchApp", platform: Platform);
using (var xiproj = XIProject.Clone (mtouchPaths.ProjectPath, "MyWatchKitExtension", "MyWatchKitApp")) {
mtouchPaths = SetupProjectPaths ("MyWatchApp", "MyWatchApp", xiproj.ProjectDirectory, platform: Platform);
Expand All @@ -49,6 +58,9 @@ public void InvalidBundleIdTest ()
[Test]
public void CreateIpa ()
{
if (isXcode10OrLater)
Assert.Ignore ("WK 1 apps are not supported when running with Xcode 10+.");

if (Platform == "iPhoneSimulator")
return; // this is a device-only test.

Expand Down
24 changes: 13 additions & 11 deletions runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ MAC_ARCHITECTURES = i386 x86_64

CLANG_ARCH = $(addprefix -arch ,$(MAC_ARCHITECTURES))
MAC_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC)
MAC32_CLANG = DEVELOPER_DIR=$(XCODE94_DEVELOPER_ROOT) $(MAC32_CC)
MAC64_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC)

MAC_SHIPPED_HEADERS = xamarin/launch.h

Expand Down Expand Up @@ -447,25 +449,25 @@ STATIC_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basena
SYSTEM_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).system.$(1).o)

.libs/mac/%$(3).dylib.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
$$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<

.libs/mac/%$(3).dylib.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
$$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<

.libs/mac/%$(3).static.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
$$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<

.libs/mac/%$(3).static.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
$$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<

.libs/mac/%$(3).system.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
$$(call Q_2,OBJC, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<

.libs/mac/%$(3).system.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
$$(call Q_2,ASM, [mac]) $(MAC$(5)_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<

.libs/mac/libxammac$(3).$(1).dylib: $$(DYNAMIC_DYLIB$(2)_OBJECTS)
$$(call Q_2,LD, [mac]) $(MAC_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS))
$$(call Q_2,LD, [mac]) $(MAC$(5)_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS))

.libs/mac/libxammac$(3).$(1).a: $$(STATIC_LAUNCHER$(2)_OBJECTS)
$$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^
Expand All @@ -475,10 +477,10 @@ SYSTEM_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basena

endef

$(eval $(call ObjTemplate,i386,32))
$(eval $(call ObjTemplate,x86_64,64))
$(eval $(call ObjTemplate,i386,DEBUG32,-debug,-DDEBUG))
$(eval $(call ObjTemplate,x86_64,DEBUG64,-debug,-DDEBUG))
$(eval $(call ObjTemplate,i386,32,,,32))
$(eval $(call ObjTemplate,x86_64,64,,,64))
$(eval $(call ObjTemplate,i386,DEBUG32,-debug,-DDEBUG,32))
$(eval $(call ObjTemplate,x86_64,DEBUG64,-debug,-DDEBUG,64))

$(foreach arch,$(MAC_ARCHITECTURES),.libs/mac/extension-main.$(arch).o): EXTRA_DEFINES=-DEXTENSION

Expand Down
17 changes: 9 additions & 8 deletions src/Intents/INCarAirCirculationModeResolutionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,27 @@ public partial class INCarAirCirculationModeResolutionResult {

public static INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCirculationMode resolvedValue)
{
#if IOS
#if __WATCHOS__
throw new PlatformNotSupportedException ("This class is not supported on watchOS");
#elif __IOS__
if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0))
#elif WATCH
if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0))
#endif
return SuccessWithResolvedCarAirCirculationMode (resolvedValue);
else
return SuccessWithResolvedValue (resolvedValue);
#endif
}

public static INCarAirCirculationModeResolutionResult GetConfirmationRequired (INCarAirCirculationMode valueToConfirm)
{
#if IOS

#if __WATCHOS__
throw new PlatformNotSupportedException ("This class is not supported on watchOS");
#elif __IOS__
if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0))
#elif WATCH
if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0))
#endif
return ConfirmationRequiredWithCarAirCirculationModeToConfirm (valueToConfirm);
else
return ConfirmationRequiredWithValueToConfirm (valueToConfirm);
#endif
}
}
}
Expand Down
Loading

0 comments on commit 2d6ce74

Please sign in to comment.