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..3b9fcf3b8d8d 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), NoTV, NoMac, 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