From 2ccf6768b57ccc0c96f0b357b2c7c8c7967c4953 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Thu, 19 Oct 2023 09:58:01 -0400 Subject: [PATCH 1/3] [NerabyInteraction] Add support for xcode 15. --- src/NearbyInteraction/Enums.cs | 2 ++ src/nearbyinteraction.cs | 17 ++++++++++++++++- .../iOS-NearbyInteraction.ignore | 1 + .../iOS-NearbyInteraction.todo | 6 ------ tests/xtro-sharpie/iOS-NearbyInteraction.ignore | 1 + tests/xtro-sharpie/iOS-NearbyInteraction.todo | 6 ------ .../watchOS-NearbyInteraction.ignore | 1 + .../xtro-sharpie/watchOS-NearbyInteraction.todo | 6 ------ 8 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.todo create mode 100644 tests/xtro-sharpie/iOS-NearbyInteraction.ignore delete mode 100644 tests/xtro-sharpie/iOS-NearbyInteraction.todo create mode 100644 tests/xtro-sharpie/watchOS-NearbyInteraction.ignore delete mode 100644 tests/xtro-sharpie/watchOS-NearbyInteraction.todo diff --git a/src/NearbyInteraction/Enums.cs b/src/NearbyInteraction/Enums.cs index b766e46663f2..7ca0202b4375 100644 --- a/src/NearbyInteraction/Enums.cs +++ b/src/NearbyInteraction/Enums.cs @@ -26,6 +26,8 @@ public enum NIErrorCode : long { UserDidNotAllow = -5884, AccessoryPeerDeviceUnavailable = -5882, InvalidARConfiguration = -5883, + IncompatiblePeerDevice = -5881, + ActiveExtendedDistanceSessionsLimitExceeded = -5880, } [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] diff --git a/src/nearbyinteraction.cs b/src/nearbyinteraction.cs index eca62ea0861d..0e6b0b73bd18 100644 --- a/src/nearbyinteraction.cs +++ b/src/nearbyinteraction.cs @@ -41,7 +41,11 @@ interface NIConfiguration : NSCopying, NSSecureCoding { } [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NIDiscoveryToken : NSCopying, NSSecureCoding { } + interface NIDiscoveryToken : NSCopying, NSSecureCoding { + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Export ("deviceCapabilities", ArgumentSemantic.Copy)] + INIDeviceCapability DeviceCapabilities { get; } + } [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] @@ -57,6 +61,10 @@ interface NINearbyPeerConfiguration { [NoWatch, iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] [Export ("cameraAssistanceEnabled")] bool CameraAssistanceEnabled { [Bind ("isCameraAssistanceEnabled")] get; set; } + + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17,0)] + [Export ("extendedDistanceMeasurementEnabled")] + bool ExtendedDistanceMeasurementEnabled { [Bind ("isExtendedDistanceMeasurementEnabled")] get; set; } } [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] @@ -231,6 +239,13 @@ interface NIDeviceCapability { [Abstract] [Export ("supportsCameraAssistance")] bool SupportsCameraAssistance { get; } + + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] +#if XAMCORE_5_0 + [Abstract] +#endif + [Export ("supportsExtendedDistanceMeasurement")] + bool SupportsExtendedDistanceMeasurement { get; } } [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.ignore new file mode 100644 index 000000000000..8b815c445066 --- /dev/null +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.ignore @@ -0,0 +1 @@ +!incorrect-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.todo deleted file mode 100644 index 193093952b33..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! NIErrorCode native value NIErrorCodeActiveExtendedDistanceSessionsLimitExceeded = -5880 not bound -!missing-enum-value! NIErrorCode native value NIErrorCodeIncompatiblePeerDevice = -5881 not bound -!missing-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement not found -!missing-selector! NIDiscoveryToken::deviceCapabilities not bound -!missing-selector! NINearbyPeerConfiguration::isExtendedDistanceMeasurementEnabled not bound -!missing-selector! NINearbyPeerConfiguration::setExtendedDistanceMeasurementEnabled: not bound diff --git a/tests/xtro-sharpie/iOS-NearbyInteraction.ignore b/tests/xtro-sharpie/iOS-NearbyInteraction.ignore new file mode 100644 index 000000000000..8b815c445066 --- /dev/null +++ b/tests/xtro-sharpie/iOS-NearbyInteraction.ignore @@ -0,0 +1 @@ +!incorrect-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/iOS-NearbyInteraction.todo b/tests/xtro-sharpie/iOS-NearbyInteraction.todo deleted file mode 100644 index 193093952b33..000000000000 --- a/tests/xtro-sharpie/iOS-NearbyInteraction.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! NIErrorCode native value NIErrorCodeActiveExtendedDistanceSessionsLimitExceeded = -5880 not bound -!missing-enum-value! NIErrorCode native value NIErrorCodeIncompatiblePeerDevice = -5881 not bound -!missing-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement not found -!missing-selector! NIDiscoveryToken::deviceCapabilities not bound -!missing-selector! NINearbyPeerConfiguration::isExtendedDistanceMeasurementEnabled not bound -!missing-selector! NINearbyPeerConfiguration::setExtendedDistanceMeasurementEnabled: not bound diff --git a/tests/xtro-sharpie/watchOS-NearbyInteraction.ignore b/tests/xtro-sharpie/watchOS-NearbyInteraction.ignore new file mode 100644 index 000000000000..8b815c445066 --- /dev/null +++ b/tests/xtro-sharpie/watchOS-NearbyInteraction.ignore @@ -0,0 +1 @@ +!incorrect-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/watchOS-NearbyInteraction.todo b/tests/xtro-sharpie/watchOS-NearbyInteraction.todo deleted file mode 100644 index 193093952b33..000000000000 --- a/tests/xtro-sharpie/watchOS-NearbyInteraction.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! NIErrorCode native value NIErrorCodeActiveExtendedDistanceSessionsLimitExceeded = -5880 not bound -!missing-enum-value! NIErrorCode native value NIErrorCodeIncompatiblePeerDevice = -5881 not bound -!missing-protocol-member! NIDeviceCapability::supportsExtendedDistanceMeasurement not found -!missing-selector! NIDiscoveryToken::deviceCapabilities not bound -!missing-selector! NINearbyPeerConfiguration::isExtendedDistanceMeasurementEnabled not bound -!missing-selector! NINearbyPeerConfiguration::setExtendedDistanceMeasurementEnabled: not bound From 51802e5adbf91c85e6ed9d5757314243239f3eb1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Thu, 19 Oct 2023 17:27:41 +0000 Subject: [PATCH 2/3] Auto-format source code --- src/nearbyinteraction.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nearbyinteraction.cs b/src/nearbyinteraction.cs index 0e6b0b73bd18..d211d40d58d1 100644 --- a/src/nearbyinteraction.cs +++ b/src/nearbyinteraction.cs @@ -41,7 +41,7 @@ interface NIConfiguration : NSCopying, NSSecureCoding { } [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NIDiscoveryToken : NSCopying, NSSecureCoding { + interface NIDiscoveryToken : NSCopying, NSSecureCoding { [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("deviceCapabilities", ArgumentSemantic.Copy)] INIDeviceCapability DeviceCapabilities { get; } @@ -62,7 +62,7 @@ interface NINearbyPeerConfiguration { [Export ("cameraAssistanceEnabled")] bool CameraAssistanceEnabled { [Bind ("isCameraAssistanceEnabled")] get; set; } - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("extendedDistanceMeasurementEnabled")] bool ExtendedDistanceMeasurementEnabled { [Bind ("isExtendedDistanceMeasurementEnabled")] get; set; } } @@ -240,7 +240,7 @@ interface NIDeviceCapability { [Export ("supportsCameraAssistance")] bool SupportsCameraAssistance { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17,0)] + [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #if XAMCORE_5_0 [Abstract] #endif From 6f5f6c576f4860008f9e03a0d99ac96329a7647f Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 19 Oct 2023 14:25:05 -0400 Subject: [PATCH 3/3] Update src/nearbyinteraction.cs --- src/nearbyinteraction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nearbyinteraction.cs b/src/nearbyinteraction.cs index d211d40d58d1..3b9fcf3b8d8d 100644 --- a/src/nearbyinteraction.cs +++ b/src/nearbyinteraction.cs @@ -240,7 +240,7 @@ interface NIDeviceCapability { [Export ("supportsCameraAssistance")] bool SupportsCameraAssistance { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] #if XAMCORE_5_0 [Abstract] #endif