Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created September 20, 2023 17:03
Show Gist options
  • Save vs-mobiletools-engineering-service2/c979f0273c095395c2c29ab750738539 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/c979f0273c095395c2c29ab750738539 to your computer and use it in GitHub Desktop.
stable-api-comparison/mac-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.Mac SDK API diff: 9.3.0 vs 9.4.0
List of API changes between Xamarin.Mac versions 9.3.0 and 9.4.0.
spouliot
sepoulio
9/20/2023
article
6aa47070-b41a-0c8a-4b51-0598e1bc1850
xamarin

Xamarin.Mac SDK API diff: 9.3.0 vs 9.4.0

Namespace AVFoundation

Type Changed: AVFoundation.AVAssetImageGenerator

Added method:

public virtual void GenerateCGImageAsynchronously (CoreMedia.CMTime requestedTime, AVAssetImageGenerateAsynchronouslyForTimeCompletionHandler handler);

Type Changed: AVFoundation.AVAudioSinkNode

Obsoleted constructors:

 [Obsolete ("Use the overload that takes a delegate that does not take a 'ref AudioBuffers' instead. Assigning a value to the 'inputData' parameter in the callback has no effect.")]
 public AVAudioSinkNode (AVAudioSinkNodeReceiverHandler receiverHandler);

Added constructors:

public AVAudioSinkNode (AVAudioSinkNodeReceiverHandler2 receiverHandler);
public AVAudioSinkNode (AVAudioSinkNodeReceiverHandlerRaw receiverHandler);

Type Changed: AVFoundation.AVMetadataObjectTypeExtensions

Added methods:

public static Foundation.NSString[] ToArray (this AVMetadataObjectType value);
public static AVMetadataObjectType ToFlags (System.Collections.Generic.IEnumerable<Foundation.NSString> constants);

New Type: AVFoundation.AVAssetImageGenerateAsynchronouslyForTimeCompletionHandler

public sealed delegate AVAssetImageGenerateAsynchronouslyForTimeCompletionHandler : System.MulticastDelegate {
	// constructors
	public AVAssetImageGenerateAsynchronouslyForTimeCompletionHandler (object object, IntPtr method);
	// methods
	public virtual System.IAsyncResult BeginInvoke (CoreGraphics.CGImage imageRef, CoreMedia.CMTime actualTime, Foundation.NSError error, System.AsyncCallback callback, object object);
	public virtual void EndInvoke (System.IAsyncResult result);
	public virtual void Invoke (CoreGraphics.CGImage imageRef, CoreMedia.CMTime actualTime, Foundation.NSError error);
}

New Type: AVFoundation.AVAudioSinkNodeReceiverHandler2

public sealed delegate AVAudioSinkNodeReceiverHandler2 : System.MulticastDelegate {
	// constructors
	public AVAudioSinkNodeReceiverHandler2 (object object, IntPtr method);
	// methods
	public virtual System.IAsyncResult BeginInvoke (AudioToolbox.AudioTimeStamp timestamp, uint frameCount, AudioToolbox.AudioBuffers inputData, System.AsyncCallback callback, object object);
	public virtual int EndInvoke (System.IAsyncResult result);
	public virtual int Invoke (AudioToolbox.AudioTimeStamp timestamp, uint frameCount, AudioToolbox.AudioBuffers inputData);
}

New Type: AVFoundation.AVAudioSinkNodeReceiverHandlerRaw

public sealed delegate AVAudioSinkNodeReceiverHandlerRaw : System.MulticastDelegate {
	// constructors
	public AVAudioSinkNodeReceiverHandlerRaw (object object, IntPtr method);
	// methods
	public virtual System.IAsyncResult BeginInvoke (IntPtr timestamp, uint frameCount, IntPtr inputData, System.AsyncCallback callback, object object);
	public virtual int EndInvoke (System.IAsyncResult result);
	public virtual int Invoke (IntPtr timestamp, uint frameCount, IntPtr inputData);
}

Namespace AppKit

Type Changed: AppKit.NSView

Added property:

public virtual bool ClipsToBounds { get; set; }

Namespace CloudKit

Type Changed: CloudKit.CKQueryOperation

Added property:

public static nint MaximumResults { get; }

Namespace CoreFoundation

Type Changed: CoreFoundation.CFRunLoop

Added properties:

public string[] AllModes { get; }
public string CurrentMode { get; }

Added method:

public CFRunLoopExitReason RunInMode (string mode, double seconds, bool returnAfterSourceHandled);

Namespace Foundation

Type Changed: Foundation.DictionaryContainer

Added method:

protected T GetStrongDictionary<T> (NSString key, System.Func<NSDictionary,T> createStrongDictionary);

Type Changed: Foundation.NSFileManager

Added methods:

public static bool GetSkipBackupAttribute (string filename);
public static bool GetSkipBackupAttribute (string filename, out NSError error);
public static NSError SetSkipBackupAttribute (string filename, bool skipBackup);

Type Changed: Foundation.NSFileProviderService

Added methods:

public virtual void GetFileProviderConnection (System.Action<NSXpcConnection,Foundation.NSError> completionHandler);
public virtual System.Threading.Tasks.Task<NSXpcConnection> GetFileProviderConnectionAsync ();

Type Changed: Foundation.NSUrl

Added methods:

public static NSUrl CreateFileUrl (string path);
public static NSUrl CreateFileUrl (string path, bool isDir);

Namespace ObjCRuntime

Type Changed: ObjCRuntime.Constants

Modified fields:

-public const string Version = "9.3.0";
+public const string Version = "9.4.0";

Added field:

public static const string ServiceManagementLibrary = "/System/Library/Frameworks/ServiceManagement.framework/ServiceManagement";

Namespace PassKit

Type Changed: PassKit.PKContactFieldsExtensions

Added methods:

public static Foundation.NSString[] ToArray (this PKContactFields value);
public static PKContactFields ToFlags (System.Collections.Generic.IEnumerable<Foundation.NSString> constants);

New Namespace ServiceManagement

New Type: ServiceManagement.SMAppService

public class SMAppService : Foundation.NSObject {
	// constructors
	protected SMAppService (Foundation.NSObjectFlag t);
	protected SMAppService (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public static SMAppService MainApp { get; }
	public virtual SMAppServiceStatus Status { get; }
	// methods
	public static SMAppService CreateAgentService (string plistName);
	public static SMAppService CreateDaemonService (string plistName);
	public static SMAppService CreateLoginItemService (string identifier);
	public static SMAppServiceStatus GetStatus (Foundation.NSUrl legacyUrl);
	public static void OpenSystemSettingsLoginItems ();
	public bool Register ();
	public virtual bool Register (out Foundation.NSError error);
	public bool Unregister ();
	public virtual void Unregister (System.Action<Foundation.NSError> handler);
	public virtual bool Unregister (out Foundation.NSError error);
	public virtual System.Threading.Tasks.Task UnregisterAsync ();
}

New Type: ServiceManagement.SMAppServiceStatus

[Serializable]
public enum SMAppServiceStatus {
	Enabled = 1,
	NotFound = 3,
	NotRegistered = 0,
	RequiresApproval = 2,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment