Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created October 11, 2022 17:47
Show Gist options
  • Save vs-mobiletools-engineering-service2/57c9da3565dd57d9e79dd97ab7a9eb3c to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/57c9da3565dd57d9e79dd97ab7a9eb3c to your computer and use it in GitHub Desktop.
previous-api-comparison/mac-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.Mac SDK API diff
List of API changes for Xamarin.Mac.
spouliot
sepoulio
10/11/2022
article
f833f3cb-eea7-c1b8-a706-dfbb597746ea
xamarin

Xamarin.Mac SDK API diff

Namespace MapKit

Type Changed: MapKit.MKDirectionsRequest

Added properties:

public virtual MKDirectionsRoutePreference HighwayPreference { get; set; }
public virtual MKDirectionsRoutePreference TollPreference { get; set; }

Type Changed: MapKit.MKMapCamera

Added method:

public static MKMapCamera CameraLookingAt (MKMapItem mapItem, CoreGraphics.CGSize viewSize, bool allowPitch);

Type Changed: MapKit.MKMapView

Added property:

public virtual MKMapConfiguration PreferredConfiguration { get; set; }

Type Changed: MapKit.MKRoute

Added properties:

public virtual bool HasHighways { get; }
public virtual bool HasTolls { get; }

Type Changed: MapKit.MKUserTrackingMode

Obsoleted fields:

 [Obsolete ("This is only available on iOS and MacCatalyst.")]
 FollowWithHeading = 2,

New Type: MapKit.IMKLookAroundViewControllerDelegate

public interface IMKLookAroundViewControllerDelegate : ObjCRuntime.INativeObject, System.IDisposable {
}

New Type: MapKit.MKDirectionsRoutePreference

[Serializable]
public enum MKDirectionsRoutePreference {
	Any = 0,
	Avoid = 1,
}

New Type: MapKit.MKHybridMapConfiguration

public class MKHybridMapConfiguration : MapKit.MKMapConfiguration {
	// constructors
	public MKHybridMapConfiguration ();
	public MKHybridMapConfiguration (Foundation.NSCoder coder);
	protected MKHybridMapConfiguration (Foundation.NSObjectFlag t);
	public MKHybridMapConfiguration (MKMapElevationStyle elevationStyle);
	protected MKHybridMapConfiguration (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual MKPointOfInterestFilter PointOfInterestFilter { get; set; }
	public virtual bool ShowsTraffic { get; set; }
}

New Type: MapKit.MKImageryMapConfiguration

public class MKImageryMapConfiguration : MapKit.MKMapConfiguration {
	// constructors
	public MKImageryMapConfiguration ();
	public MKImageryMapConfiguration (Foundation.NSCoder coder);
	protected MKImageryMapConfiguration (Foundation.NSObjectFlag t);
	public MKImageryMapConfiguration (MKMapElevationStyle elevationStyle);
	protected MKImageryMapConfiguration (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
}

New Type: MapKit.MKLookAroundBadgePosition

[Serializable]
public enum MKLookAroundBadgePosition {
	BottomTrailing = 2,
	TopLeading = 0,
	TopTrailing = 1,
}

New Type: MapKit.MKLookAroundScene

public class MKLookAroundScene : Foundation.NSObject, Foundation.INSCopying, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	protected MKLookAroundScene (Foundation.NSObjectFlag t);
	protected MKLookAroundScene (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	// methods
	public virtual Foundation.NSObject Copy (Foundation.NSZone zone);
}

New Type: MapKit.MKLookAroundSceneRequest

public class MKLookAroundSceneRequest : Foundation.NSObject {
	// constructors
	public MKLookAroundSceneRequest (CoreLocation.CLLocationCoordinate2D coordinate);
	protected MKLookAroundSceneRequest (Foundation.NSObjectFlag t);
	public MKLookAroundSceneRequest (MKMapItem mapItem);
	protected MKLookAroundSceneRequest (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual CoreLocation.CLLocationCoordinate2D Coordinate { get; }
	public virtual bool IsCancelled { get; }
	public virtual bool IsLoading { get; }
	public virtual MKMapItem MapItem { get; }
	// methods
	public virtual void Cancel ();
	public virtual void GetScene (System.Action<MKLookAroundScene,Foundation.NSError> completionHandler);
	public virtual System.Threading.Tasks.Task<MKLookAroundScene> GetSceneAsync ();
}

New Type: MapKit.MKLookAroundSnapshot

public class MKLookAroundSnapshot : Foundation.NSObject {
	// constructors
	protected MKLookAroundSnapshot (Foundation.NSObjectFlag t);
	protected MKLookAroundSnapshot (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual AppKit.NSImage Image { get; }
}

New Type: MapKit.MKLookAroundSnapshotOptions

public class MKLookAroundSnapshotOptions : Foundation.NSObject {
	// constructors
	public MKLookAroundSnapshotOptions ();
	protected MKLookAroundSnapshotOptions (Foundation.NSObjectFlag t);
	protected MKLookAroundSnapshotOptions (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual MKPointOfInterestFilter PointOfInterestFilter { get; set; }
	public virtual CoreGraphics.CGSize Size { get; set; }
}

New Type: MapKit.MKLookAroundSnapshotter

public class MKLookAroundSnapshotter : Foundation.NSObject {
	// constructors
	protected MKLookAroundSnapshotter (Foundation.NSObjectFlag t);
	protected MKLookAroundSnapshotter (IntPtr handle);
	public MKLookAroundSnapshotter (MKLookAroundScene scene, MKLookAroundSnapshotOptions options);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual bool IsLoading { get; }
	// methods
	public virtual void Cancel ();
	public virtual void GetSnapshot (System.Action<MKLookAroundSnapshot,Foundation.NSError> completionHandler);
	public virtual System.Threading.Tasks.Task<MKLookAroundSnapshot> GetSnapshotAsync ();
}

New Type: MapKit.MKLookAroundViewController

public class MKLookAroundViewController : AppKit.NSViewController, Foundation.INSCoding, Foundation.INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public MKLookAroundViewController ();
	public MKLookAroundViewController (Foundation.NSCoder coder);
	protected MKLookAroundViewController (Foundation.NSObjectFlag t);
	public MKLookAroundViewController (MKLookAroundScene scene);
	protected MKLookAroundViewController (IntPtr handle);
	public MKLookAroundViewController (string nibName, Foundation.NSBundle nibBundle);
	// properties
	public virtual MKLookAroundBadgePosition BadgePosition { get; set; }
	public override IntPtr ClassHandle { get; }
	public IMKLookAroundViewControllerDelegate Delegate { get; set; }
	public virtual bool NavigationEnabled { get; set; }
	public virtual MKPointOfInterestFilter PointOfInterestFilter { get; set; }
	public virtual MKLookAroundScene Scene { get; set; }
	public virtual bool ShowsRoadLabels { get; set; }
	public virtual Foundation.NSObject WeakDelegate { get; set; }
	// methods
	protected override void Dispose (bool disposing);
	public virtual void EncodeTo (Foundation.NSCoder encoder);
}

New Type: MapKit.MKLookAroundViewControllerDelegate

public class MKLookAroundViewControllerDelegate : Foundation.NSObject, IMKLookAroundViewControllerDelegate, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public MKLookAroundViewControllerDelegate ();
	protected MKLookAroundViewControllerDelegate (Foundation.NSObjectFlag t);
	protected MKLookAroundViewControllerDelegate (IntPtr handle);
	// methods
	public virtual void DidDismissFullScreen (MKLookAroundViewController viewController);
	public virtual void DidPresentFullScreen (MKLookAroundViewController viewController);
	public virtual void DidUpdateScene (MKLookAroundViewController viewController);
	public virtual void WillDismissFullScreen (MKLookAroundViewController viewController);
	public virtual void WillPresentFullScreen (MKLookAroundViewController viewController);
	public virtual void WillUpdateScene (MKLookAroundViewController viewController);
}

New Type: MapKit.MKLookAroundViewControllerDelegate_Extensions

public static class MKLookAroundViewControllerDelegate_Extensions {
	// methods
	public static void DidDismissFullScreen (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
	public static void DidPresentFullScreen (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
	public static void DidUpdateScene (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
	public static void WillDismissFullScreen (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
	public static void WillPresentFullScreen (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
	public static void WillUpdateScene (this IMKLookAroundViewControllerDelegate This, MKLookAroundViewController viewController);
}

New Type: MapKit.MKMapConfiguration

public class MKMapConfiguration : Foundation.NSObject, Foundation.INSCoding, Foundation.INSCopying, Foundation.INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public MKMapConfiguration (Foundation.NSCoder coder);
	protected MKMapConfiguration (Foundation.NSObjectFlag t);
	protected MKMapConfiguration (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual MKMapElevationStyle ElevationStyle { get; set; }
	// methods
	public virtual Foundation.NSObject Copy (Foundation.NSZone zone);
	public virtual void EncodeTo (Foundation.NSCoder encoder);
}

New Type: MapKit.MKMapElevationStyle

[Serializable]
public enum MKMapElevationStyle {
	Flat = 0,
	Realistic = 1,
}

New Type: MapKit.MKStandardMapConfiguration

public class MKStandardMapConfiguration : MapKit.MKMapConfiguration {
	// constructors
	public MKStandardMapConfiguration ();
	public MKStandardMapConfiguration (Foundation.NSCoder coder);
	protected MKStandardMapConfiguration (Foundation.NSObjectFlag t);
	public MKStandardMapConfiguration (MKMapElevationStyle elevationStyle);
	public MKStandardMapConfiguration (MKStandardMapEmphasisStyle emphasisStyle);
	protected MKStandardMapConfiguration (IntPtr handle);
	public MKStandardMapConfiguration (MKMapElevationStyle elevationStyle, MKStandardMapEmphasisStyle emphasisStyle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual MKStandardMapEmphasisStyle EmphasisStyle { get; set; }
	public virtual MKPointOfInterestFilter PointOfInterestFilter { get; set; }
	public virtual bool ShowsTraffic { get; set; }
}

New Type: MapKit.MKStandardMapEmphasisStyle

[Serializable]
public enum MKStandardMapEmphasisStyle {
	Default = 0,
	Muted = 1,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment