Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created September 7, 2023 09:12
Show Gist options
  • Save vs-mobiletools-engineering-service2/f6159096d42785fa3d786cf7c7719370 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/f6159096d42785fa3d786cf7c7719370 to your computer and use it in GitHub Desktop.
stable-api-comparison/watchos-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.WatchOS SDK API diff: 16.4.0 vs 16.5.0
List of API changes between Xamarin.WatchOS versions 16.4.0 and 16.5.0.
spouliot
sepoulio
9/7/2023
article
523ae67d-3107-8503-6972-d0a4e2b6fae6
xamarin

Xamarin.WatchOS SDK API diff: 16.4.0 vs 16.5.0

Namespace AVFoundation

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 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 Foundation.NSError SetActive (bool active, AVAudioSessionSetActiveOptions options);
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);

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.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 = "16.4.0";
+public const string Version = "16.5.0";

Namespace StoreKit

Type Changed: StoreKit.SKCloudServiceController

Added constructor:

public SKCloudServiceController ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment