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/1da0c5bced2f16e790e0589c0a0cd997 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/1da0c5bced2f16e790e0589c0a0cd997 to your computer and use it in GitHub Desktop.
stable-api-comparison/diff/dotnet/Microsoft.macOS.Ref/ref/net7.0/Microsoft.macOS.md

API diff: Microsoft.macOS.dll

Microsoft.macOS.dll

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 IntPtr 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

Added field:

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

Type Changed: ObjCRuntime.Runtime

Added method:

public static Foundation.NSObject GetNSObject (NativeHandle ptr);

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);

Namespace StoreKit

Type Changed: StoreKit.SKCloudServiceController

Added constructor:

public SKCloudServiceController ();

New Namespace ServiceManagement

New Type: ServiceManagement.SMAppService

public class SMAppService : Foundation.NSObject {
	// constructors
	protected SMAppService (Foundation.NSObjectFlag t);
	protected SMAppService (ObjCRuntime.NativeHandle handle);
	// properties
	public override ObjCRuntime.NativeHandle 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