From 7fc87ecc1dcce807024c8d306971a93eb4f1ca69 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 29 Jul 2021 15:33:21 -0400 Subject: [PATCH 1/2] [CoreLocation] Add support for Xcode 13 beta 4. --- src/corelocation.cs | 26 +++++++++++++++++++ .../MacCatalyst-CoreLocation.todo | 7 ----- tests/xtro-sharpie/iOS-CoreLocation.todo | 7 ----- tests/xtro-sharpie/macOS-CoreLocation.todo | 7 ----- tests/xtro-sharpie/tvOS-CoreLocation.todo | 7 ----- tests/xtro-sharpie/watchOS-CoreLocation.todo | 7 ----- 6 files changed, 26 insertions(+), 35 deletions(-) delete mode 100644 tests/xtro-sharpie/MacCatalyst-CoreLocation.todo delete mode 100644 tests/xtro-sharpie/iOS-CoreLocation.todo delete mode 100644 tests/xtro-sharpie/macOS-CoreLocation.todo delete mode 100644 tests/xtro-sharpie/tvOS-CoreLocation.todo delete mode 100644 tests/xtro-sharpie/watchOS-CoreLocation.todo diff --git a/src/corelocation.cs b/src/corelocation.cs index 8f83b5bc482e..24fdd2895b52 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -134,6 +134,10 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:")] IntPtr Constructor (CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp); + [Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:")] + IntPtr Constructor (CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp, CLLocationSourceInformation sourceInfo); + // Apple keep changing the 'introduction' of this field (5.0->8.0->5.0) but it was not available in 6.1 // nor in 7.0 - but it works on my iPad3 running iOS 7.1 [NoTV][NoWatch] @@ -168,6 +172,14 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [iOS (8,0)] [NullAllowed, Export ("floor", ArgumentSemantic.Copy)] CLFloor Floor { get; } + + [Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Export ("ellipsoidalAltitude")] + double EllipsoidalAltitude { get; } + + [Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [NullAllowed, Export ("sourceInformation")] + CLLocationSourceInformation SourceInformation { get; } } [Mac (10,15)] @@ -905,4 +917,18 @@ interface CLLocationPushServiceExtension void ServiceExtensionWillTerminate (); } + [Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [BaseType (typeof(NSObject))] + interface CLLocationSourceInformation : NSCopying, NSSecureCoding + { + [Export ("initWithSoftwareSimulationState:andExternalAccessoryState:")] + IntPtr Constructor (bool isSoftware, bool isAccessory); + + [Export ("isSimulatedBySoftware")] + bool IsSimulatedBySoftware { get; } + + [Export ("isProducedByAccessory")] + bool IsProducedByAccessory { get; } + } + } diff --git a/tests/xtro-sharpie/MacCatalyst-CoreLocation.todo b/tests/xtro-sharpie/MacCatalyst-CoreLocation.todo deleted file mode 100644 index ec1b8807a34c..000000000000 --- a/tests/xtro-sharpie/MacCatalyst-CoreLocation.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-selector! CLLocation::ellipsoidalAltitude not bound -!missing-selector! CLLocation::initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo: not bound -!missing-selector! CLLocation::sourceInformation not bound -!missing-selector! CLLocationSourceInformation::initWithSoftwareSimulationState:andExternalAccessoryState: not bound -!missing-selector! CLLocationSourceInformation::isProducedByAccessory not bound -!missing-selector! CLLocationSourceInformation::isSimulatedBySoftware not bound -!missing-type! CLLocationSourceInformation not bound diff --git a/tests/xtro-sharpie/iOS-CoreLocation.todo b/tests/xtro-sharpie/iOS-CoreLocation.todo deleted file mode 100644 index ec1b8807a34c..000000000000 --- a/tests/xtro-sharpie/iOS-CoreLocation.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-selector! CLLocation::ellipsoidalAltitude not bound -!missing-selector! CLLocation::initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo: not bound -!missing-selector! CLLocation::sourceInformation not bound -!missing-selector! CLLocationSourceInformation::initWithSoftwareSimulationState:andExternalAccessoryState: not bound -!missing-selector! CLLocationSourceInformation::isProducedByAccessory not bound -!missing-selector! CLLocationSourceInformation::isSimulatedBySoftware not bound -!missing-type! CLLocationSourceInformation not bound diff --git a/tests/xtro-sharpie/macOS-CoreLocation.todo b/tests/xtro-sharpie/macOS-CoreLocation.todo deleted file mode 100644 index ec1b8807a34c..000000000000 --- a/tests/xtro-sharpie/macOS-CoreLocation.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-selector! CLLocation::ellipsoidalAltitude not bound -!missing-selector! CLLocation::initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo: not bound -!missing-selector! CLLocation::sourceInformation not bound -!missing-selector! CLLocationSourceInformation::initWithSoftwareSimulationState:andExternalAccessoryState: not bound -!missing-selector! CLLocationSourceInformation::isProducedByAccessory not bound -!missing-selector! CLLocationSourceInformation::isSimulatedBySoftware not bound -!missing-type! CLLocationSourceInformation not bound diff --git a/tests/xtro-sharpie/tvOS-CoreLocation.todo b/tests/xtro-sharpie/tvOS-CoreLocation.todo deleted file mode 100644 index ec1b8807a34c..000000000000 --- a/tests/xtro-sharpie/tvOS-CoreLocation.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-selector! CLLocation::ellipsoidalAltitude not bound -!missing-selector! CLLocation::initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo: not bound -!missing-selector! CLLocation::sourceInformation not bound -!missing-selector! CLLocationSourceInformation::initWithSoftwareSimulationState:andExternalAccessoryState: not bound -!missing-selector! CLLocationSourceInformation::isProducedByAccessory not bound -!missing-selector! CLLocationSourceInformation::isSimulatedBySoftware not bound -!missing-type! CLLocationSourceInformation not bound diff --git a/tests/xtro-sharpie/watchOS-CoreLocation.todo b/tests/xtro-sharpie/watchOS-CoreLocation.todo deleted file mode 100644 index ec1b8807a34c..000000000000 --- a/tests/xtro-sharpie/watchOS-CoreLocation.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-selector! CLLocation::ellipsoidalAltitude not bound -!missing-selector! CLLocation::initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo: not bound -!missing-selector! CLLocation::sourceInformation not bound -!missing-selector! CLLocationSourceInformation::initWithSoftwareSimulationState:andExternalAccessoryState: not bound -!missing-selector! CLLocationSourceInformation::isProducedByAccessory not bound -!missing-selector! CLLocationSourceInformation::isSimulatedBySoftware not bound -!missing-type! CLLocationSourceInformation not bound From 8f0757e21de1a5383cc8d39b017aac424125a275 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 29 Jul 2021 13:04:13 -0700 Subject: [PATCH 2/2] Update src/corelocation.cs --- src/corelocation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelocation.cs b/src/corelocation.cs index 24fdd2895b52..49f5c92f1b55 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -136,7 +136,7 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Watch (8,0), TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:")] - IntPtr Constructor (CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp, CLLocationSourceInformation sourceInfo); + IntPtr Constructor (CLLocationCoordinate2D coordinate, double altitude, double horizontalAccuracy, double verticalAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp, CLLocationSourceInformation sourceInfo); // Apple keep changing the 'introduction' of this field (5.0->8.0->5.0) but it was not available in 6.1 // nor in 7.0 - but it works on my iPad3 running iOS 7.1