Skip to content

Commit 16207e9

Browse files
authored
[CarPlay] Implement Xcode 16.0 beta 1-6 changes. (#21039)
Note: there were no changes in beta 2, beta 3, beta 4, beta 5 or beta 6.
1 parent 515d0ce commit 16207e9

File tree

10 files changed

+159
-109
lines changed

10 files changed

+159
-109
lines changed

src/CarPlay/CPCompat.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#nullable enable
1111

1212
using System;
13+
using CoreGraphics;
1314
using Foundation;
1415
using ObjCRuntime;
1516
using System.ComponentModel;
@@ -18,8 +19,8 @@
1819
using NativeHandle = System.IntPtr;
1920
#endif
2021

21-
#if !NET
2222
namespace CarPlay {
23+
#if !NET
2324
[Register (SkipRegistration = true)]
2425
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
2526
[Obsolete ("This API has been removed from the native SDK.")]
@@ -38,5 +39,24 @@ public class CPEntity : NSObject, INSSecureCoding {
3839

3940
public override NativeHandle ClassHandle => throw new NotSupportedException ();
4041
}
41-
}
4242
#endif
43+
#if !XAMCORE_5_0 && __IOS__
44+
public partial class CPListItem {
45+
#if NET
46+
[ObsoletedOSPlatform ("ios14.0", "Do not use; this API was removed.")]
47+
[UnsupportedOSPlatform ("tvos")]
48+
[UnsupportedOSPlatform ("macos")]
49+
[UnsupportedOSPlatform ("maccatalyst")]
50+
[SupportedOSPlatform ("ios12.0")]
51+
#else
52+
[Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")]
53+
#endif
54+
[EditorBrowsable (EditorBrowsableState.Never)]
55+
public static CGSize MaximumListItemImageSize {
56+
get {
57+
return default (CGSize);
58+
}
59+
}
60+
}
61+
#endif // !XAMCORE_5_0 && __IOS__
62+
}

src/carplay.cs

Lines changed: 60 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,15 @@ interface CPAlertAction : NSSecureCoding {
326326
interface CPBarButton : NSSecureCoding {
327327

328328
[Deprecated (PlatformName.iOS, 14, 0)]
329+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
329330
[Export ("initWithType:handler:")]
330331
NativeHandle Constructor (CPBarButtonType type, [NullAllowed] Action<CPBarButton> handler);
331332

332333
[Export ("enabled")]
333334
bool Enabled { [Bind ("isEnabled")] get; set; }
334335

335336
[Deprecated (PlatformName.iOS, 14, 0)]
337+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
336338
[Export ("buttonType", ArgumentSemantic.Assign)]
337339
CPBarButtonType ButtonType { get; }
338340

@@ -445,30 +447,37 @@ interface CPInterfaceController {
445447
bool PrefersDarkUserInterfaceStyle { get; set; }
446448

447449
[Deprecated (PlatformName.iOS, 14, 0)]
450+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
448451
[Export ("setRootTemplate:animated:")]
449452
void SetRootTemplate (CPTemplate rootTemplate, bool animated);
450453

451454
[Deprecated (PlatformName.iOS, 14, 0)]
455+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
452456
[Export ("pushTemplate:animated:")]
453457
void PushTemplate (CPTemplate templateToPush, bool animated);
454458

455459
[Deprecated (PlatformName.iOS, 14, 0)]
460+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
456461
[Export ("popTemplateAnimated:")]
457462
void PopTemplate (bool animated);
458463

459464
[Deprecated (PlatformName.iOS, 14, 0)]
465+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
460466
[Export ("popToRootTemplateAnimated:")]
461467
void PopToRootTemplate (bool animated);
462468

463469
[Deprecated (PlatformName.iOS, 14, 0)]
470+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
464471
[Export ("popToTemplate:animated:")]
465472
void PopToTemplate (CPTemplate targetTemplate, bool animated);
466473

467474
[Deprecated (PlatformName.iOS, 14, 0)]
475+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
468476
[Export ("presentTemplate:animated:")]
469477
void PresentTemplate (CPTemplate templateToPresent, bool animated);
470478

471479
[Deprecated (PlatformName.iOS, 14, 0)]
480+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
472481
[Export ("dismissTemplateAnimated:")]
473482
void DismissTemplate (bool animated);
474483

@@ -557,6 +566,7 @@ interface ICPApplicationDelegate { }
557566
/// <summary>The application delegate for CarPlay applications.</summary>
558567
[Introduced (PlatformName.iOS, 12, 0)]
559568
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")]
569+
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")]
560570
[NoWatch, NoTV, NoMac]
561571
#if NET
562572
[Protocol, Model]
@@ -586,12 +596,8 @@ interface CPApplicationDelegate : UIApplicationDelegate {
586596
[BaseType (typeof (NSObject))]
587597
[DisableDefaultCtor]
588598
interface CPListItem : CPSelectableListItem, NSSecureCoding {
589-
590-
[Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")]
591-
[Field ("CPMaximumListItemImageSize")]
592-
CGSize MaximumListItemImageSize { get; }
593-
594599
[Deprecated (PlatformName.iOS, 14, 0)]
600+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
595601
[Export ("initWithText:detailText:image:showsDisclosureIndicator:")]
596602
NativeHandle Constructor ([NullAllowed] string text, [NullAllowed] string detailText, [NullAllowed] UIImage image, bool showsDisclosureIndicator);
597603

@@ -612,6 +618,7 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding {
612618
UIImage Image { get; }
613619

614620
[Deprecated (PlatformName.iOS, 14, 0)]
621+
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
615622
[Export ("showsDisclosureIndicator")]
616623
bool ShowsDisclosureIndicator { get; }
617624

@@ -751,11 +758,13 @@ interface CPListTemplate : CPBarButtonProviding {
751758
NativeHandle Constructor ([NullAllowed] string title, CPListSection [] sections, [NullAllowed] CPAssistantCellConfiguration assistantCellConfiguration);
752759

753760
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
761+
[Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
754762
[Wrap ("WeakDelegate")]
755763
[NullAllowed]
756764
ICPListTemplateDelegate Delegate { get; set; }
757765

758766
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
767+
[Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
759768
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
760769
NSObject WeakDelegate { get; set; }
761770

@@ -810,6 +819,7 @@ interface ICPListTemplateDelegate { }
810819

811820
/// <summary>Abstract implementation of <see cref="T:CarPlay.ICPListTemplateDelegate" />, the delegate object for <see cref="T:CarPlay.CPListTemplate" /> objects.</summary>
812821
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
822+
[Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
813823
[NoWatch, NoTV, NoMac, iOS (12, 0)]
814824
#if NET
815825
[Protocol, Model]
@@ -830,6 +840,7 @@ interface CPListTemplateDelegate {
830840
interface CPManeuver : NSCopying, NSSecureCoding {
831841

832842
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CPManeuver.SymbolImage' instead.")]
843+
[Deprecated (PlatformName.MacCatalyst, 13, 0, message: "Use 'CPManeuver.SymbolImage' instead.")]
833844
[NullAllowed, Export ("symbolSet", ArgumentSemantic.Strong)]
834845
CPImageSet SymbolSet { get; set; }
835846

@@ -1105,6 +1116,7 @@ interface CPNavigationAlert : NSSecureCoding {
11051116

11061117

11071118
[Deprecated (PlatformName.iOS, 13, 0, message: "Use constructor that takes in 'UIImage' instead of 'CPImageSet'.")]
1119+
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use constructor that takes in 'UIImage' instead of 'CPImageSet'.")]
11081120
[Export ("initWithTitleVariants:subtitleVariants:imageSet:primaryAction:secondaryAction:duration:")]
11091121
NativeHandle Constructor (string [] titleVariants, [NullAllowed] string [] subtitleVariants, [NullAllowed] CPImageSet imageSet, CPAlertAction primaryAction, [NullAllowed] CPAlertAction secondaryAction, double duration);
11101122

@@ -2343,18 +2355,56 @@ interface CPTemplateApplicationInstrumentClusterScene {
23432355
UIUserInterfaceStyle ContentStyle { get; }
23442356
}
23452357

2346-
[NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)]
2358+
[NoWatch, NoTV, NoMac, iOS (17, 4)]
2359+
[NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (17, 4)]
23472360
[BaseType (typeof (NSObject))]
2361+
[DisableDefaultCtor]
23482362
interface CPLane : NSCopying, NSSecureCoding {
2349-
23502363
[Export ("status", ArgumentSemantic.Assign)]
2351-
CPLaneStatus Status { get; set; }
2364+
CPLaneStatus Status {
2365+
get;
2366+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement<NSUnitAngle>' constructor to create a CPLane with CPLaneStatus.NotGood, or use the 'NSMeasurement<NSUnitAngle>[], NSMeasurement<NSUnitAngle>[], bool' constructor to create a CPLane with status CPLaneStatus.Good or CPLaneStatus.Preferred.")]
2367+
set;
2368+
}
23522369

23532370
[Export ("primaryAngle", ArgumentSemantic.Strong)]
2354-
NSMeasurement<NSUnitAngle> PrimaryAngle { get; set; }
2371+
NSMeasurement<NSUnitAngle> PrimaryAngle {
2372+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'HighlightedAngle' property instead.")]
2373+
get;
2374+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement<NSUnitAngle>[], NSMeasurement<NSUnitAngle>[], bool' to create a CPLane with a HighlightedAngle.")]
2375+
set;
2376+
}
23552377

23562378
[Export ("secondaryAngles", ArgumentSemantic.Strong)]
2357-
NSMeasurement<NSUnitAngle> [] SecondaryAngles { get; set; }
2379+
NSMeasurement<NSUnitAngle> [] SecondaryAngles {
2380+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'Angles' property instead.")]
2381+
get;
2382+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use the 'NSMeasurement<NSUnitAngle>' constructor or the 'NSMeasurement<NSUnitAngle>[], NSMeasurement<NSUnitAngle>[], bool' constructor to create a CPLane with angles.")]
2383+
set;
2384+
}
2385+
2386+
[Export ("init")]
2387+
[Deprecated (PlatformName.iOS, 18, 0, message: "Use either of the other two constructors instead.")]
2388+
NativeHandle Constructor ();
2389+
2390+
[iOS (18, 0), MacCatalyst (18, 0)]
2391+
[Export ("initWithAngles:")]
2392+
NativeHandle Constructor (NSMeasurement<NSUnitAngle> [] angles);
2393+
2394+
[iOS (18, 0), MacCatalyst (18, 0)]
2395+
[Export ("initWithAngles:highlightedAngle:isPreferred:")]
2396+
NativeHandle Constructor (NSMeasurement<NSUnitAngle> [] angles, NSMeasurement<NSUnitAngle> [] highlightedAngle, bool isPreferred);
2397+
2398+
2399+
[NullAllowed]
2400+
[iOS (18, 0), MacCatalyst (18, 0)]
2401+
[Export ("highlightedAngle", ArgumentSemantic.Strong)]
2402+
NSMeasurement<NSUnitAngle> HighlightedAngle { get; }
2403+
2404+
2405+
[iOS (18, 0), MacCatalyst (18, 0)]
2406+
[Export ("angles", ArgumentSemantic.Copy)]
2407+
NSMeasurement<NSUnitAngle> [] Angles { get; }
23582408
}
23592409

23602410
[NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)]

src/foundation.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4593,6 +4593,12 @@ interface NSError : NSSecureCoding, NSCopying {
45934593
[Field ("CMErrorDomain", "CoreMotion")]
45944594
NSString CoreMotionErrorDomain { get; }
45954595

4596+
[NoMac, NoTV, NoWatch]
4597+
[iOS (12, 0)]
4598+
[NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (14, 0)]
4599+
[Field ("CarPlayErrorDomain", "CarPlay")]
4600+
NSString CarPlayErrorDomain { get; }
4601+
45964602
#if !XAMCORE_3_0
45974603
// now exposed with the corresponding EABluetoothAccessoryPickerError enum
45984604
[NoMac, NoTV, NoWatch]

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28170,6 +28170,9 @@ M:CarPlay.CPInterfaceControllerDelegate.TemplateDidAppear(CarPlay.CPTemplate,Sys
2817028170
M:CarPlay.CPInterfaceControllerDelegate.TemplateDidDisappear(CarPlay.CPTemplate,System.Boolean)
2817128171
M:CarPlay.CPInterfaceControllerDelegate.TemplateWillAppear(CarPlay.CPTemplate,System.Boolean)
2817228172
M:CarPlay.CPInterfaceControllerDelegate.TemplateWillDisappear(CarPlay.CPTemplate,System.Boolean)
28173+
M:CarPlay.CPLane.#ctor
28174+
M:CarPlay.CPLane.#ctor(Foundation.NSMeasurement{Foundation.NSUnitAngle}[],Foundation.NSMeasurement{Foundation.NSUnitAngle}[],System.Boolean)
28175+
M:CarPlay.CPLane.#ctor(Foundation.NSMeasurement{Foundation.NSUnitAngle}[])
2817328176
M:CarPlay.CPLane.Copy(Foundation.NSZone)
2817428177
M:CarPlay.CPLane.EncodeTo(Foundation.NSCoder)
2817528178
M:CarPlay.CPLaneGuidance.Copy(Foundation.NSZone)
@@ -59003,6 +59006,8 @@ P:CarPlay.CPInterfaceController.RootTemplate
5900359006
P:CarPlay.CPInterfaceController.Templates
5900459007
P:CarPlay.CPInterfaceController.TopTemplate
5900559008
P:CarPlay.CPInterfaceController.WeakDelegate
59009+
P:CarPlay.CPLane.Angles
59010+
P:CarPlay.CPLane.HighlightedAngle
5900659011
P:CarPlay.CPLane.PrimaryAngle
5900759012
P:CarPlay.CPLane.SecondaryAngles
5900859013
P:CarPlay.CPLane.Status
@@ -59026,7 +59031,6 @@ P:CarPlay.CPListItem.Image
5902659031
P:CarPlay.CPListItem.IsExplicitContent
5902759032
P:CarPlay.CPListItem.IsPlaying
5902859033
P:CarPlay.CPListItem.MaximumImageSize
59029-
P:CarPlay.CPListItem.MaximumListItemImageSize
5903059034
P:CarPlay.CPListItem.PlaybackProgress
5903159035
P:CarPlay.CPListItem.PlayingIndicatorLocation
5903259036
P:CarPlay.CPListItem.ShowsDisclosureIndicator
@@ -65214,6 +65218,7 @@ P:Foundation.NSDictionary`2.Values
6521465218
P:Foundation.NSDimension.BaseUnit
6521565219
P:Foundation.NSDistributedNotificationCenter.NSLocalNotificationCenterType
6521665220
P:Foundation.NSEnergyFormatter.ForFoodEnergyUse
65221+
P:Foundation.NSError.CarPlayErrorDomain
6521765222
P:Foundation.NSError.CFNetworkErrorDomain
6521865223
P:Foundation.NSError.CocoaErrorDomain
6521965224
P:Foundation.NSError.CoreLocationErrorDomain

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CarPlay.ignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,68 @@
514514
!missing-selector! CPTemplateApplicationScene::contentStyle not bound
515515
!missing-type! CPInstrumentClusterController not bound
516516
!missing-type! CPTemplateApplicationInstrumentClusterScene not bound
517+
!missing-selector! CPAlertAction::color not bound
518+
!missing-selector! CPAlertAction::initWithTitle:color:handler: not bound
519+
!missing-enum! CPJunctionType not bound
520+
!missing-enum! CPLaneStatus not bound
521+
!missing-enum! CPManeuverState not bound
522+
!missing-enum! CPManeuverType not bound
523+
!missing-enum! CPTrafficSide not bound
524+
!missing-selector! +CPPointOfInterest::pinImageSize not bound
525+
!missing-selector! +CPPointOfInterest::selectedPinImageSize not bound
526+
!missing-selector! CPLane::status not bound
527+
!missing-selector! CPLaneGuidance::instructionVariants not bound
528+
!missing-selector! CPLaneGuidance::lanes not bound
529+
!missing-selector! CPLaneGuidance::setInstructionVariants: not bound
530+
!missing-selector! CPLaneGuidance::setLanes: not bound
531+
!missing-selector! CPListImageRowItem::imageTitles not bound
532+
!missing-selector! CPListImageRowItem::initWithText:images:imageTitles: not bound
533+
!missing-selector! CPListImageRowItem::setImageTitles: not bound
534+
!missing-selector! CPManeuver::highwayExitLabel not bound
535+
!missing-selector! CPManeuver::junctionElementAngles not bound
536+
!missing-selector! CPManeuver::junctionExitAngle not bound
537+
!missing-selector! CPManeuver::junctionType not bound
538+
!missing-selector! CPManeuver::linkedLaneGuidance not bound
539+
!missing-selector! CPManeuver::maneuverType not bound
540+
!missing-selector! CPManeuver::roadFollowingManeuverVariants not bound
541+
!missing-selector! CPManeuver::setHighwayExitLabel: not bound
542+
!missing-selector! CPManeuver::setJunctionElementAngles: not bound
543+
!missing-selector! CPManeuver::setJunctionExitAngle: not bound
544+
!missing-selector! CPManeuver::setJunctionType: not bound
545+
!missing-selector! CPManeuver::setLinkedLaneGuidance: not bound
546+
!missing-selector! CPManeuver::setManeuverType: not bound
547+
!missing-selector! CPManeuver::setRoadFollowingManeuverVariants: not bound
548+
!missing-selector! CPManeuver::setTrafficSide: not bound
549+
!missing-selector! CPManeuver::trafficSide not bound
550+
!missing-selector! CPNavigationSession::addLaneGuidances: not bound
551+
!missing-selector! CPNavigationSession::addManeuvers: not bound
552+
!missing-selector! CPNavigationSession::currentLaneGuidance not bound
553+
!missing-selector! CPNavigationSession::currentRoadNameVariants not bound
554+
!missing-selector! CPNavigationSession::maneuverState not bound
555+
!missing-selector! CPNavigationSession::resumeTripWithUpdatedRouteInformation: not bound
556+
!missing-selector! CPNavigationSession::setCurrentLaneGuidance: not bound
557+
!missing-selector! CPNavigationSession::setCurrentRoadNameVariants: not bound
558+
!missing-selector! CPNavigationSession::setManeuverState: not bound
559+
!missing-selector! CPPointOfInterest::initWithLocation:title:subtitle:summary:detailTitle:detailSubtitle:detailSummary:pinImage:selectedPinImage: not bound
560+
!missing-selector! CPPointOfInterest::selectedPinImage not bound
561+
!missing-selector! CPPointOfInterest::setSelectedPinImage: not bound
562+
!missing-selector! CPRouteInformation::currentLaneGuidance not bound
563+
!missing-selector! CPRouteInformation::currentManeuvers not bound
564+
!missing-selector! CPRouteInformation::initWithManeuvers:laneGuidances:currentManeuvers:currentLaneGuidance:tripTravelEstimates:maneuverTravelEstimates: not bound
565+
!missing-selector! CPRouteInformation::laneGuidances not bound
566+
!missing-selector! CPRouteInformation::maneuvers not bound
567+
!missing-selector! CPRouteInformation::maneuverTravelEstimates not bound
568+
!missing-selector! CPRouteInformation::tripTravelEstimates not bound
569+
!missing-selector! CPTabBarTemplate::selectTemplate: not bound
570+
!missing-selector! CPTabBarTemplate::selectTemplateAtIndex: not bound
571+
!missing-selector! CPTravelEstimates::distanceRemainingToDisplay not bound
572+
!missing-selector! CPTravelEstimates::initWithDistanceRemaining:distanceRemainingToDisplay:timeRemaining: not bound
573+
!missing-selector! CPTrip::destinationNameVariants not bound
574+
!missing-selector! CPTrip::setDestinationNameVariants: not bound
575+
!missing-type! CPLane not bound
576+
!missing-type! CPLaneGuidance not bound
577+
!missing-type! CPRouteInformation not bound
578+
!missing-selector! CPLane::angles not bound
579+
!missing-selector! CPLane::highlightedAngle not bound
580+
!missing-selector! CPLane::initWithAngles: not bound
581+
!missing-selector! CPLane::initWithAngles:highlightedAngle:isPreferred: not bound

0 commit comments

Comments
 (0)