Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created August 28, 2023 17:22
Show Gist options
  • Save vs-mobiletools-engineering-service2/f4eec35f7fb36efb16b5dfdd988d22de to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/f4eec35f7fb36efb16b5dfdd988d22de to your computer and use it in GitHub Desktop.
stable-api-comparison/diff/dotnet/Microsoft.MacCatalyst.Ref/ref/net7.0/Microsoft.MacCatalyst.md

API diff: Microsoft.MacCatalyst.dll

Microsoft.MacCatalyst.dll

Namespace AVFoundation

Type Changed: AVFoundation.AVAssetImageGenerator

Added method:

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

Type Changed: AVFoundation.AVAudioSession

Obsoleted properties:

 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryAmbient { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryAudioProcessing { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryMultiRoute { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryPlayAndRecord { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryPlayback { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategoryRecord { get; }
 [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")]
 public static Foundation.NSString CategorySoloAmbient { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeDefault { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeGameChat { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeMeasurement { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeMoviePlayback { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeSpokenAudio { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeVideoChat { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeVideoRecording { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString ModeVoiceChat { get; }
 [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")]
 public static Foundation.NSString VoicePrompt { get; }

Added methods:

public bool SetCategory (AVAudioSessionCategory category, AVAudioSessionCategoryOptions options, out Foundation.NSError outError);
public Foundation.NSError SetCategory (AVAudioSessionCategory category, AVAudioSessionMode mode, AVAudioSessionCategoryOptions options);
public Foundation.NSError SetCategory (AVAudioSessionCategory category, string mode, AVAudioSessionCategoryOptions options);
public bool SetCategory (AVAudioSessionCategory category, AVAudioSessionMode mode, AVAudioSessionCategoryOptions options, out Foundation.NSError outError);
public bool SetCategory (AVAudioSessionCategory category, string mode, AVAudioSessionCategoryOptions options, out Foundation.NSError outError);
public bool SetCategory (AVAudioSessionCategory category, AVAudioSessionMode mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, out Foundation.NSError outError);
public bool SetCategory (AVAudioSessionCategory category, string mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, out Foundation.NSError outError);
public bool SetMode (AVAudioSessionMode mode, out Foundation.NSError error);

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.AVCaptureSession

Added properties:

public virtual float HardwareCost { get; }
public static Foundation.NSString PresetiFrame960x540 { get; }

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.AVAudioSessionCategoryExtensions

public static class AVAudioSessionCategoryExtensions {
	// methods
	public static Foundation.NSString GetConstant (this AVAudioSessionCategory self);
	public static AVAudioSessionCategory GetValue (Foundation.NSString constant);
}

New Type: AVFoundation.AVAudioSessionMode

[Serializable]
public enum AVAudioSessionMode {
	Default = 0,
	GameChat = 4,
	Measurement = 3,
	MoviePlayback = 5,
	SpokenAudio = 7,
	VideoChat = 6,
	VideoRecording = 2,
	VoiceChat = 1,
	VoicePrompt = 8,
}

New Type: AVFoundation.AVAudioSessionModeExtensions

public static class AVAudioSessionModeExtensions {
	// methods
	public static Foundation.NSString GetConstant (this AVAudioSessionMode self);
	public static AVAudioSessionMode GetValue (Foundation.NSString constant);
}

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