From 0995bd7af714e23fde48c054d8cba88974cb7e7d Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 21 Jun 2022 17:14:16 -0400 Subject: [PATCH] [CarPlay] Add support for Xcode 14 beta 1&2. --- src/carplay.cs | 31 +++++++++++++++++-- .../api-annotations-dotnet/iOS-CarPlay.todo | 9 ------ tests/xtro-sharpie/iOS-CarPlay.todo | 9 ------ 3 files changed, 29 insertions(+), 20 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo delete mode 100644 tests/xtro-sharpie/iOS-CarPlay.todo diff --git a/src/carplay.cs b/src/carplay.cs index e4f0c5a0d38e..90decc7df8fb 100644 --- a/src/carplay.cs +++ b/src/carplay.cs @@ -210,6 +210,10 @@ interface CPAlertAction : NSSecureCoding { [Export ("initWithTitle:style:handler:")] NativeHandle Constructor (string title, CPAlertActionStyle style, Action handler); + [NoWatch, NoTV, NoMac, iOS (16,0)] + [Export ("initWithTitle:color:handler:")] + NativeHandle Constructor (string title, UIColor color, Action handler); + [Export ("title")] string Title { get; } @@ -218,6 +222,11 @@ interface CPAlertAction : NSSecureCoding { [Export ("handler", ArgumentSemantic.Copy)] Action Handler { get; } + + [NullAllowed] + [NoWatch, NoTV, NoMac, iOS (16,0)] + [Export ("color", ArgumentSemantic.Copy)] + UIColor Color { get; } } delegate void CPBarButtonHandler (CPBarButton button); @@ -1736,9 +1745,13 @@ interface CPNowPlayingImageButton interface CPPointOfInterest : NSSecureCoding { [Export ("initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:")] - [DesignatedInitializer] NativeHandle Constructor (MKMapItem location, string title, [NullAllowed] string subtitle, [NullAllowed] string summary, [NullAllowed] string detailTitle, [NullAllowed] string detailSubtitle, [NullAllowed] string detailSummary, [NullAllowed] UIImage pinImage); + [iOS (16,0)] + [Export ("initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:selectedPinImage:")] + [DesignatedInitializer] + NativeHandle Constructor (MKMapItem location, string title, [NullAllowed] string subtitle, [NullAllowed] string summary, [NullAllowed] string detailTitle, [NullAllowed] string detailSubtitle, [NullAllowed] string detailSummary, [NullAllowed] UIImage pinImage, [NullAllowed] UIImage selectedPinImage); + [Export ("location", ArgumentSemantic.Strong)] MKMapItem Location { get; set; } @@ -1771,6 +1784,20 @@ interface CPPointOfInterest : NSSecureCoding [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] NSObject UserInfo { get; set; } + + [iOS (16, 0)] + [Static] + [Export ("pinImageSize")] + CGSize PinImageSize { get; } + + [iOS (16, 0)] + [Static] + [Export ("selectedPinImageSize")] + CGSize SelectedPinImageSize { get; } + + [iOS (16, 0)] + [NullAllowed, Export ("selectedPinImage", ArgumentSemantic.Strong)] + UIImage SelectedPinImage { get; set; } } interface ICPPointOfInterestTemplateDelegate { } @@ -1795,7 +1822,7 @@ interface CPPointOfInterestTemplateDelegate [NoWatch, NoTV, NoMac, iOS (14,0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] - interface CPPointOfInterestTemplate + interface CPPointOfInterestTemplate : CPBarButtonProviding { [Export ("initWithTitle:pointsOfInterest:selectedIndex:")] [DesignatedInitializer] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo deleted file mode 100644 index 07d5c249d49c..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! CPAlertAction::color not bound -!missing-selector! CPAlertAction::initWithTitle:color:handler: not bound -!extra-designated-initializer! CPPointOfInterest::initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage: is incorrectly decorated with an [DesignatedInitializer] attribute -!missing-protocol-conformance! CPPointOfInterestTemplate should conform to CPBarButtonProviding -!missing-selector! +CPPointOfInterest::pinImageSize not bound -!missing-selector! +CPPointOfInterest::selectedPinImageSize not bound -!missing-selector! CPPointOfInterest::initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:selectedPinImage: not bound -!missing-selector! CPPointOfInterest::selectedPinImage not bound -!missing-selector! CPPointOfInterest::setSelectedPinImage: not bound diff --git a/tests/xtro-sharpie/iOS-CarPlay.todo b/tests/xtro-sharpie/iOS-CarPlay.todo deleted file mode 100644 index 07d5c249d49c..000000000000 --- a/tests/xtro-sharpie/iOS-CarPlay.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! CPAlertAction::color not bound -!missing-selector! CPAlertAction::initWithTitle:color:handler: not bound -!extra-designated-initializer! CPPointOfInterest::initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage: is incorrectly decorated with an [DesignatedInitializer] attribute -!missing-protocol-conformance! CPPointOfInterestTemplate should conform to CPBarButtonProviding -!missing-selector! +CPPointOfInterest::pinImageSize not bound -!missing-selector! +CPPointOfInterest::selectedPinImageSize not bound -!missing-selector! CPPointOfInterest::initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:selectedPinImage: not bound -!missing-selector! CPPointOfInterest::selectedPinImage not bound -!missing-selector! CPPointOfInterest::setSelectedPinImage: not bound