From 7749b91153e0ce7c08d64bd58f76f13fd8f3a898 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Fri, 5 Aug 2022 11:51:11 -0400 Subject: [PATCH] [DeviceCheck] Add support for Xcode 14 beta 4. (#15639) --- src/devicecheck.cs | 8 ++++---- src/frameworks.sources | 5 +---- tests/introspection/ApiTypeTest.cs | 2 +- tests/xtro-sharpie/watchOS-DeviceCheck.todo | 12 ------------ tools/common/Frameworks.cs | 1 + 5 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 tests/xtro-sharpie/watchOS-DeviceCheck.todo diff --git a/src/devicecheck.cs b/src/devicecheck.cs index 606f525ee64c..a486909c0877 100644 --- a/src/devicecheck.cs +++ b/src/devicecheck.cs @@ -14,7 +14,7 @@ namespace DeviceCheck { - [TV (11,0), NoWatch, iOS (11,0)] + [TV (11,0), Watch (9,0), iOS (11,0)] [Mac (10,15)] [ErrorDomain ("DCErrorDomain")] [Native] @@ -26,11 +26,11 @@ public enum DCError : long { ServerUnavailable, } - [TV (11,0), NoWatch, iOS (11,0)] + [TV (11,0), Watch (9,0), iOS (11,0)] [Mac (10,15)] delegate void DCDeviceGenerateTokenCompletionHandler ([NullAllowed] NSData token, [NullAllowed] NSError error); - [TV (11,0), NoWatch, iOS (11,0)] + [TV (11,0), Watch (9,0), iOS (11,0)] [Mac (10,15)] [DisableDefaultCtor] // From the documentation it seems the only way to create a usable instance is to use the static CurrentDevice property. [BaseType (typeof (NSObject))] @@ -48,7 +48,7 @@ interface DCDevice { void GenerateToken (DCDeviceGenerateTokenCompletionHandler completion); } - [NoWatch] + [Watch (9,0)] [iOS (14,0)] [Mac (11,3)] [TV (15,0)] diff --git a/src/frameworks.sources b/src/frameworks.sources index a7d90a042494..fe94f4ef958e 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1967,6 +1967,7 @@ COMMON_FRAMEWORKS = \ CoreML \ CoreVideo \ Compression \ + DeviceCheck \ Foundation \ GameKit \ NaturalLanguage \ @@ -2009,7 +2010,6 @@ MACOS_FRAMEWORKS = \ CoreSpotlight \ CoreText \ CoreWlan \ - DeviceCheck \ EventKit \ ExecutionPolicy \ ExternalAccessory \ @@ -2118,7 +2118,6 @@ IOS_FRAMEWORKS = \ CoreSpotlight \ CoreTelephony \ CoreText \ - DeviceCheck \ EventKit \ EventKitUI \ ExternalAccessory \ @@ -2237,7 +2236,6 @@ TVOS_FRAMEWORKS = \ CoreLocation \ CoreSpotlight \ CoreText \ - DeviceCheck \ ExternalAccessory \ GLKit \ GameController \ @@ -2310,7 +2308,6 @@ MACCATALYST_FRAMEWORKS = \ CoreTelephony \ CoreText \ CoreWlan \ - DeviceCheck \ EventKit \ EventKitUI \ ExternalAccessory \ diff --git a/tests/introspection/ApiTypeTest.cs b/tests/introspection/ApiTypeTest.cs index c442896fd995..5dc7b3de60c4 100644 --- a/tests/introspection/ApiTypeTest.cs +++ b/tests/introspection/ApiTypeTest.cs @@ -19,7 +19,7 @@ public class ApiTypeTest : ApiBaseTest { bool Skip (Type type) { switch (type.Namespace) { -#if __IOS__ +#if __IOS__ || __WATCHOS__ // running the .cctor on the simulator works... but makes some other CoreNFC intro tests fail later // we'll still get the results from device tests case "CoreNFC": diff --git a/tests/xtro-sharpie/watchOS-DeviceCheck.todo b/tests/xtro-sharpie/watchOS-DeviceCheck.todo deleted file mode 100644 index 00d038152ae8..000000000000 --- a/tests/xtro-sharpie/watchOS-DeviceCheck.todo +++ /dev/null @@ -1,12 +0,0 @@ -!missing-enum! DCError not bound -!missing-field! DCErrorDomain not bound -!missing-selector! +DCAppAttestService::sharedService not bound -!missing-selector! +DCDevice::currentDevice not bound -!missing-selector! DCAppAttestService::attestKey:clientDataHash:completionHandler: not bound -!missing-selector! DCAppAttestService::generateAssertion:clientDataHash:completionHandler: not bound -!missing-selector! DCAppAttestService::generateKeyWithCompletionHandler: not bound -!missing-selector! DCAppAttestService::isSupported not bound -!missing-selector! DCDevice::generateTokenWithCompletionHandler: not bound -!missing-selector! DCDevice::isSupported not bound -!missing-type! DCAppAttestService not bound -!missing-type! DCDevice not bound diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index b94b26d82014..997ae19a20da 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -519,6 +519,7 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build) { "OSLog", "OSLog", 8,0 }, { "ShazamKit", "ShazamKit", new Version (8, 0), NotAvailableInSimulator}, + { "DeviceCheck", "DeviceCheck", 9,0 }, { "CallKit", "CallKit", 9,0 }, }; }