From ada099c5286c9f514b3ffc9c41242c83315523d8 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 13 Aug 2024 19:56:16 +0200 Subject: [PATCH 1/2] [CarPlay] Implement Xcode 16.0 beta 1-5 changes. Note: there were no changes in beta 2, beta 3, beta 4 or beta 5. --- src/carplay.cs | 70 ++++++++++++++++--- src/foundation.cs | 6 ++ .../Documentation.KnownFailures.txt | 7 +- .../MacCatalyst-CarPlay.ignore | 65 +++++++++++++++++ .../MacCatalyst-CarPlay.todo | 65 ----------------- .../api-annotations-dotnet/iOS-CarPlay.ignore | 5 -- .../api-annotations-dotnet/iOS-CarPlay.todo | 10 --- tests/xtro-sharpie/iOS-CarPlay.ignore | 6 -- tests/xtro-sharpie/iOS-CarPlay.todo | 10 --- 9 files changed, 137 insertions(+), 107 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.ignore 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 7fc8a2211691..f3c5c01f776f 100644 --- a/src/carplay.cs +++ b/src/carplay.cs @@ -326,6 +326,7 @@ interface CPAlertAction : NSSecureCoding { interface CPBarButton : NSSecureCoding { [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("initWithType:handler:")] NativeHandle Constructor (CPBarButtonType type, [NullAllowed] Action handler); @@ -333,6 +334,7 @@ interface CPBarButton : NSSecureCoding { bool Enabled { [Bind ("isEnabled")] get; set; } [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("buttonType", ArgumentSemantic.Assign)] CPBarButtonType ButtonType { get; } @@ -445,30 +447,37 @@ interface CPInterfaceController { bool PrefersDarkUserInterfaceStyle { get; set; } [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("setRootTemplate:animated:")] void SetRootTemplate (CPTemplate rootTemplate, bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("pushTemplate:animated:")] void PushTemplate (CPTemplate templateToPush, bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("popTemplateAnimated:")] void PopTemplate (bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("popToRootTemplateAnimated:")] void PopToRootTemplate (bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("popToTemplate:animated:")] void PopToTemplate (CPTemplate targetTemplate, bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("presentTemplate:animated:")] void PresentTemplate (CPTemplate templateToPresent, bool animated); [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("dismissTemplateAnimated:")] void DismissTemplate (bool animated); @@ -557,6 +566,7 @@ interface ICPApplicationDelegate { } /// The application delegate for CarPlay applications. [Introduced (PlatformName.iOS, 12, 0)] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")] + [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")] [NoWatch, NoTV, NoMac] #if NET [Protocol, Model] @@ -586,12 +596,8 @@ interface CPApplicationDelegate : UIApplicationDelegate { [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPListItem : CPSelectableListItem, NSSecureCoding { - - [Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")] - [Field ("CPMaximumListItemImageSize")] - CGSize MaximumListItemImageSize { get; } - [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("initWithText:detailText:image:showsDisclosureIndicator:")] NativeHandle Constructor ([NullAllowed] string text, [NullAllowed] string detailText, [NullAllowed] UIImage image, bool showsDisclosureIndicator); @@ -612,6 +618,7 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding { UIImage Image { get; } [Deprecated (PlatformName.iOS, 14, 0)] + [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("showsDisclosureIndicator")] bool ShowsDisclosureIndicator { get; } @@ -751,11 +758,13 @@ interface CPListTemplate : CPBarButtonProviding { NativeHandle Constructor ([NullAllowed] string title, CPListSection [] sections, [NullAllowed] CPAssistantCellConfiguration assistantCellConfiguration); [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")] + [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")] [Wrap ("WeakDelegate")] [NullAllowed] ICPListTemplateDelegate Delegate { get; set; } [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")] + [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")] [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } @@ -810,6 +819,7 @@ interface ICPListTemplateDelegate { } /// Abstract implementation of , the delegate object for objects. [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")] + [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")] [NoWatch, NoTV, NoMac, iOS (12, 0)] #if NET [Protocol, Model] @@ -830,6 +840,7 @@ interface CPListTemplateDelegate { interface CPManeuver : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CPManeuver.SymbolImage' instead.")] + [Deprecated (PlatformName.MacCatalyst, 13, 0, message: "Use 'CPManeuver.SymbolImage' instead.")] [NullAllowed, Export ("symbolSet", ArgumentSemantic.Strong)] CPImageSet SymbolSet { get; set; } @@ -1105,6 +1116,7 @@ interface CPNavigationAlert : NSSecureCoding { [Deprecated (PlatformName.iOS, 13, 0, message: "Use constructor that takes in 'UIImage' instead of 'CPImageSet'.")] + [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use constructor that takes in 'UIImage' instead of 'CPImageSet'.")] [Export ("initWithTitleVariants:subtitleVariants:imageSet:primaryAction:secondaryAction:duration:")] NativeHandle Constructor (string [] titleVariants, [NullAllowed] string [] subtitleVariants, [NullAllowed] CPImageSet imageSet, CPAlertAction primaryAction, [NullAllowed] CPAlertAction secondaryAction, double duration); @@ -2343,18 +2355,56 @@ interface CPTemplateApplicationInstrumentClusterScene { UIUserInterfaceStyle ContentStyle { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoWatch, NoTV, NoMac, iOS (17, 4)] + [NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] + [DisableDefaultCtor] interface CPLane : NSCopying, NSSecureCoding { - [Export ("status", ArgumentSemantic.Assign)] - CPLaneStatus Status { get; set; } + CPLaneStatus Status { + get; + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement' constructor to create a CPLane with CPLaneStatus.NotGood, or use the 'NSMeasurement[], NSMeasurement[], bool' constructor to create a CPLane with status CPLaneStatus.Good or CPLaneStatus.Preferred.")] + set; + } [Export ("primaryAngle", ArgumentSemantic.Strong)] - NSMeasurement PrimaryAngle { get; set; } + NSMeasurement PrimaryAngle { + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'HighlightedAngle' property instead.")] + get; + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement[], NSMeasurement[], bool' to create a CPLane with a HighlightedAngle.")] + set; + } [Export ("secondaryAngles", ArgumentSemantic.Strong)] - NSMeasurement [] SecondaryAngles { get; set; } + NSMeasurement [] SecondaryAngles { + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'Angles' property instead.")] + get; + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement' constructor or the 'NSMeasurement[], NSMeasurement[], bool' constructor to create a CPLane with angles.")] + set; + } + + [Export ("init")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use either of the other two constructors instead.")] + NativeHandle Constructor (); + + [iOS (18, 0), MacCatalyst (18, 0)] + [Export ("initWithAngles:")] + NativeHandle Constructor (NSMeasurement [] angles); + + [iOS (18, 0), MacCatalyst (18, 0)] + [Export ("initWithAngles:highlightedAngle:isPreferred:")] + NativeHandle Constructor (NSMeasurement [] angles, NSMeasurement [] highlightedAngle, bool isPreferred); + + + [NullAllowed] + [iOS (18, 0), MacCatalyst (18, 0)] + [Export ("highlightedAngle", ArgumentSemantic.Strong)] + NSMeasurement HighlightedAngle { get; } + + + [iOS (18, 0), MacCatalyst (18, 0)] + [Export ("angles", ArgumentSemantic.Copy)] + NSMeasurement [] Angles { get; } } [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] diff --git a/src/foundation.cs b/src/foundation.cs index eb8e44187c92..c277b322caff 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -4586,6 +4586,12 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("CMErrorDomain", "CoreMotion")] NSString CoreMotionErrorDomain { get; } + [NoMac, NoTV, NoWatch] + [iOS (12, 0)] + [NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (14, 0)] + [Field ("CarPlayErrorDomain", "CarPlay")] + NSString CarPlayErrorDomain { get; } + #if !XAMCORE_3_0 // now exposed with the corresponding EABluetoothAccessoryPickerError enum [NoMac, NoTV, NoWatch] diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 154ff1611f76..47203c259be6 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -27916,6 +27916,9 @@ M:CarPlay.CPInterfaceControllerDelegate.TemplateDidAppear(CarPlay.CPTemplate,Sys M:CarPlay.CPInterfaceControllerDelegate.TemplateDidDisappear(CarPlay.CPTemplate,System.Boolean) M:CarPlay.CPInterfaceControllerDelegate.TemplateWillAppear(CarPlay.CPTemplate,System.Boolean) M:CarPlay.CPInterfaceControllerDelegate.TemplateWillDisappear(CarPlay.CPTemplate,System.Boolean) +M:CarPlay.CPLane.#ctor +M:CarPlay.CPLane.#ctor(Foundation.NSMeasurement{Foundation.NSUnitAngle}[],Foundation.NSMeasurement{Foundation.NSUnitAngle}[],System.Boolean) +M:CarPlay.CPLane.#ctor(Foundation.NSMeasurement{Foundation.NSUnitAngle}[]) M:CarPlay.CPLane.Copy(Foundation.NSZone) M:CarPlay.CPLane.EncodeTo(Foundation.NSCoder) M:CarPlay.CPLaneGuidance.Copy(Foundation.NSZone) @@ -58303,6 +58306,8 @@ P:CarPlay.CPInterfaceController.RootTemplate P:CarPlay.CPInterfaceController.Templates P:CarPlay.CPInterfaceController.TopTemplate P:CarPlay.CPInterfaceController.WeakDelegate +P:CarPlay.CPLane.Angles +P:CarPlay.CPLane.HighlightedAngle P:CarPlay.CPLane.PrimaryAngle P:CarPlay.CPLane.SecondaryAngles P:CarPlay.CPLane.Status @@ -58326,7 +58331,6 @@ P:CarPlay.CPListItem.Image P:CarPlay.CPListItem.IsExplicitContent P:CarPlay.CPListItem.IsPlaying P:CarPlay.CPListItem.MaximumImageSize -P:CarPlay.CPListItem.MaximumListItemImageSize P:CarPlay.CPListItem.PlaybackProgress P:CarPlay.CPListItem.PlayingIndicatorLocation P:CarPlay.CPListItem.ShowsDisclosureIndicator @@ -64415,6 +64419,7 @@ P:Foundation.NSDictionary`2.Values P:Foundation.NSDimension.BaseUnit P:Foundation.NSDistributedNotificationCenter.NSLocalNotificationCenterType P:Foundation.NSEnergyFormatter.ForFoodEnergyUse +P:Foundation.NSError.CarPlayErrorDomain P:Foundation.NSError.CFNetworkErrorDomain P:Foundation.NSError.CocoaErrorDomain P:Foundation.NSError.CoreLocationErrorDomain diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.ignore index 90074beb4733..3d5bc04558a6 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.ignore @@ -514,3 +514,68 @@ !missing-selector! CPTemplateApplicationScene::contentStyle not bound !missing-type! CPInstrumentClusterController not bound !missing-type! CPTemplateApplicationInstrumentClusterScene not bound +!missing-selector! CPAlertAction::color not bound +!missing-selector! CPAlertAction::initWithTitle:color:handler: not bound +!missing-enum! CPJunctionType not bound +!missing-enum! CPLaneStatus not bound +!missing-enum! CPManeuverState not bound +!missing-enum! CPManeuverType not bound +!missing-enum! CPTrafficSide not bound +!missing-selector! +CPPointOfInterest::pinImageSize not bound +!missing-selector! +CPPointOfInterest::selectedPinImageSize not bound +!missing-selector! CPLane::status not bound +!missing-selector! CPLaneGuidance::instructionVariants not bound +!missing-selector! CPLaneGuidance::lanes not bound +!missing-selector! CPLaneGuidance::setInstructionVariants: not bound +!missing-selector! CPLaneGuidance::setLanes: not bound +!missing-selector! CPListImageRowItem::imageTitles not bound +!missing-selector! CPListImageRowItem::initWithText:images:imageTitles: not bound +!missing-selector! CPListImageRowItem::setImageTitles: not bound +!missing-selector! CPManeuver::highwayExitLabel not bound +!missing-selector! CPManeuver::junctionElementAngles not bound +!missing-selector! CPManeuver::junctionExitAngle not bound +!missing-selector! CPManeuver::junctionType not bound +!missing-selector! CPManeuver::linkedLaneGuidance not bound +!missing-selector! CPManeuver::maneuverType not bound +!missing-selector! CPManeuver::roadFollowingManeuverVariants not bound +!missing-selector! CPManeuver::setHighwayExitLabel: not bound +!missing-selector! CPManeuver::setJunctionElementAngles: not bound +!missing-selector! CPManeuver::setJunctionExitAngle: not bound +!missing-selector! CPManeuver::setJunctionType: not bound +!missing-selector! CPManeuver::setLinkedLaneGuidance: not bound +!missing-selector! CPManeuver::setManeuverType: not bound +!missing-selector! CPManeuver::setRoadFollowingManeuverVariants: not bound +!missing-selector! CPManeuver::setTrafficSide: not bound +!missing-selector! CPManeuver::trafficSide not bound +!missing-selector! CPNavigationSession::addLaneGuidances: not bound +!missing-selector! CPNavigationSession::addManeuvers: not bound +!missing-selector! CPNavigationSession::currentLaneGuidance not bound +!missing-selector! CPNavigationSession::currentRoadNameVariants not bound +!missing-selector! CPNavigationSession::maneuverState not bound +!missing-selector! CPNavigationSession::resumeTripWithUpdatedRouteInformation: not bound +!missing-selector! CPNavigationSession::setCurrentLaneGuidance: not bound +!missing-selector! CPNavigationSession::setCurrentRoadNameVariants: not bound +!missing-selector! CPNavigationSession::setManeuverState: 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 +!missing-selector! CPRouteInformation::currentLaneGuidance not bound +!missing-selector! CPRouteInformation::currentManeuvers not bound +!missing-selector! CPRouteInformation::initWithManeuvers:laneGuidances:currentManeuvers:currentLaneGuidance:tripTravelEstimates:maneuverTravelEstimates: not bound +!missing-selector! CPRouteInformation::laneGuidances not bound +!missing-selector! CPRouteInformation::maneuvers not bound +!missing-selector! CPRouteInformation::maneuverTravelEstimates not bound +!missing-selector! CPRouteInformation::tripTravelEstimates not bound +!missing-selector! CPTabBarTemplate::selectTemplate: not bound +!missing-selector! CPTabBarTemplate::selectTemplateAtIndex: not bound +!missing-selector! CPTravelEstimates::distanceRemainingToDisplay not bound +!missing-selector! CPTravelEstimates::initWithDistanceRemaining:distanceRemainingToDisplay:timeRemaining: not bound +!missing-selector! CPTrip::destinationNameVariants not bound +!missing-selector! CPTrip::setDestinationNameVariants: not bound +!missing-type! CPLane not bound +!missing-type! CPLaneGuidance not bound +!missing-type! CPRouteInformation not bound +!missing-selector! CPLane::angles not bound +!missing-selector! CPLane::highlightedAngle not bound +!missing-selector! CPLane::initWithAngles: not bound +!missing-selector! CPLane::initWithAngles:highlightedAngle:isPreferred: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.todo deleted file mode 100644 index b7b6214c8ff5..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.todo +++ /dev/null @@ -1,65 +0,0 @@ -!missing-selector! CPAlertAction::color not bound -!missing-selector! CPAlertAction::initWithTitle:color:handler: not bound -!missing-enum! CPJunctionType not bound -!missing-enum! CPLaneStatus not bound -!missing-enum! CPManeuverState not bound -!missing-enum! CPManeuverType not bound -!missing-enum! CPTrafficSide not bound -!missing-selector! +CPPointOfInterest::pinImageSize not bound -!missing-selector! +CPPointOfInterest::selectedPinImageSize not bound -!missing-selector! CPLane::status not bound -!missing-selector! CPLaneGuidance::instructionVariants not bound -!missing-selector! CPLaneGuidance::lanes not bound -!missing-selector! CPLaneGuidance::setInstructionVariants: not bound -!missing-selector! CPLaneGuidance::setLanes: not bound -!missing-selector! CPListImageRowItem::imageTitles not bound -!missing-selector! CPListImageRowItem::initWithText:images:imageTitles: not bound -!missing-selector! CPListImageRowItem::setImageTitles: not bound -!missing-selector! CPManeuver::highwayExitLabel not bound -!missing-selector! CPManeuver::junctionElementAngles not bound -!missing-selector! CPManeuver::junctionExitAngle not bound -!missing-selector! CPManeuver::junctionType not bound -!missing-selector! CPManeuver::linkedLaneGuidance not bound -!missing-selector! CPManeuver::maneuverType not bound -!missing-selector! CPManeuver::roadFollowingManeuverVariants not bound -!missing-selector! CPManeuver::setHighwayExitLabel: not bound -!missing-selector! CPManeuver::setJunctionElementAngles: not bound -!missing-selector! CPManeuver::setJunctionExitAngle: not bound -!missing-selector! CPManeuver::setJunctionType: not bound -!missing-selector! CPManeuver::setLinkedLaneGuidance: not bound -!missing-selector! CPManeuver::setManeuverType: not bound -!missing-selector! CPManeuver::setRoadFollowingManeuverVariants: not bound -!missing-selector! CPManeuver::setTrafficSide: not bound -!missing-selector! CPManeuver::trafficSide not bound -!missing-selector! CPNavigationSession::addLaneGuidances: not bound -!missing-selector! CPNavigationSession::addManeuvers: not bound -!missing-selector! CPNavigationSession::currentLaneGuidance not bound -!missing-selector! CPNavigationSession::currentRoadNameVariants not bound -!missing-selector! CPNavigationSession::maneuverState not bound -!missing-selector! CPNavigationSession::resumeTripWithUpdatedRouteInformation: not bound -!missing-selector! CPNavigationSession::setCurrentLaneGuidance: not bound -!missing-selector! CPNavigationSession::setCurrentRoadNameVariants: not bound -!missing-selector! CPNavigationSession::setManeuverState: 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 -!missing-selector! CPRouteInformation::currentLaneGuidance not bound -!missing-selector! CPRouteInformation::currentManeuvers not bound -!missing-selector! CPRouteInformation::initWithManeuvers:laneGuidances:currentManeuvers:currentLaneGuidance:tripTravelEstimates:maneuverTravelEstimates: not bound -!missing-selector! CPRouteInformation::laneGuidances not bound -!missing-selector! CPRouteInformation::maneuvers not bound -!missing-selector! CPRouteInformation::maneuverTravelEstimates not bound -!missing-selector! CPRouteInformation::tripTravelEstimates not bound -!missing-selector! CPTabBarTemplate::selectTemplate: not bound -!missing-selector! CPTabBarTemplate::selectTemplateAtIndex: not bound -!missing-selector! CPTravelEstimates::distanceRemainingToDisplay not bound -!missing-selector! CPTravelEstimates::initWithDistanceRemaining:distanceRemainingToDisplay:timeRemaining: not bound -!missing-selector! CPTrip::destinationNameVariants not bound -!missing-selector! CPTrip::setDestinationNameVariants: not bound -!missing-type! CPLane not bound -!missing-type! CPLaneGuidance not bound -!missing-type! CPRouteInformation not bound -!missing-selector! CPLane::angles not bound -!missing-selector! CPLane::highlightedAngle not bound -!missing-selector! CPLane::initWithAngles: not bound -!missing-selector! CPLane::initWithAngles:highlightedAngle:isPreferred: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.ignore deleted file mode 100644 index 3bb9297a9786..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.ignore +++ /dev/null @@ -1,5 +0,0 @@ -# Removed in iOS 14 -!unknown-field! CPMaximumListItemImageSize bound - -# As of Xcode 12 beta 6 the CarPlay framework does not have an error enum -!missing-field! CarPlayErrorDomain not bound 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 0dd9d67a8bf5..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CarPlay.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-selector! CPLane::angles not bound -!missing-selector! CPLane::highlightedAngle not bound -!missing-selector! CPLane::initWithAngles: not bound -!missing-selector! CPLane::initWithAngles:highlightedAngle:isPreferred: not bound -!deprecated-attribute-missing! CPLane::init missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::primaryAngle missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::secondaryAngles missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setPrimaryAngle: missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setSecondaryAngles: missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setStatus: missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/iOS-CarPlay.ignore b/tests/xtro-sharpie/iOS-CarPlay.ignore index 64f30b19d7d1..b4f9a430e9f3 100644 --- a/tests/xtro-sharpie/iOS-CarPlay.ignore +++ b/tests/xtro-sharpie/iOS-CarPlay.ignore @@ -3,9 +3,3 @@ !incorrect-protocol-member! CPSessionConfigurationDelegate::sessionConfiguration:limitedUserInterfacesChanged: is OPTIONAL and should NOT be abstract !incorrect-protocol-member! CPListTemplateItem::isEnabled is REQUIRED and should be abstract !incorrect-protocol-member! CPListTemplateItem::setEnabled: is REQUIRED and should be abstract - -# Removed in iOS 14 -!unknown-field! CPMaximumListItemImageSize bound - -# As of Xcode 12 beta 6 the CarPlay framework does not have an error enum -!missing-field! CarPlayErrorDomain not bound diff --git a/tests/xtro-sharpie/iOS-CarPlay.todo b/tests/xtro-sharpie/iOS-CarPlay.todo deleted file mode 100644 index 0dd9d67a8bf5..000000000000 --- a/tests/xtro-sharpie/iOS-CarPlay.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-selector! CPLane::angles not bound -!missing-selector! CPLane::highlightedAngle not bound -!missing-selector! CPLane::initWithAngles: not bound -!missing-selector! CPLane::initWithAngles:highlightedAngle:isPreferred: not bound -!deprecated-attribute-missing! CPLane::init missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::primaryAngle missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::secondaryAngles missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setPrimaryAngle: missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setSecondaryAngles: missing a [Deprecated] attribute -!deprecated-attribute-missing! CPLane::setStatus: missing a [Deprecated] attribute From 15891e2209ed9c3b59ea73f8bdde0f04eee686a4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 22 Aug 2024 13:41:59 +0200 Subject: [PATCH 2/2] Add back compat field. --- src/CarPlay/CPCompat.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/CarPlay/CPCompat.cs b/src/CarPlay/CPCompat.cs index 9a71e16ca0ed..4d4701d7c1ba 100644 --- a/src/CarPlay/CPCompat.cs +++ b/src/CarPlay/CPCompat.cs @@ -10,6 +10,7 @@ #nullable enable using System; +using CoreGraphics; using Foundation; using ObjCRuntime; using System.ComponentModel; @@ -18,8 +19,8 @@ using NativeHandle = System.IntPtr; #endif -#if !NET namespace CarPlay { +#if !NET [Register (SkipRegistration = true)] [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] [Obsolete ("This API has been removed from the native SDK.")] @@ -38,5 +39,24 @@ public class CPEntity : NSObject, INSSecureCoding { public override NativeHandle ClassHandle => throw new NotSupportedException (); } -} #endif +#if !XAMCORE_5_0 && __IOS__ + public partial class CPListItem { +#if NET + [ObsoletedOSPlatform ("ios14.0", "Do not use; this API was removed.")] + [UnsupportedOSPlatform ("tvos")] + [UnsupportedOSPlatform ("macos")] + [UnsupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("ios12.0")] +#else + [Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")] +#endif + [EditorBrowsable (EditorBrowsableState.Never)] + public static CGSize MaximumListItemImageSize { + get { + return default (CGSize); + } + } + } +#endif // !XAMCORE_5_0 && __IOS__ +}