Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created August 25, 2023 18:38
Show Gist options
  • Save vs-mobiletools-engineering-service2/3feaa9b06357c05c52a98004ef8178e1 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/3feaa9b06357c05c52a98004ef8178e1 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.99.0
List of API changes between Xamarin.WatchOS versions 16.4.0 and 16.99.0.
spouliot
sepoulio
8/25/2023
article
61313fd0-1f04-6c2b-eb1a-d42ecd9dcad0
xamarin

Xamarin.WatchOS SDK API diff: 16.4.0 vs 16.99.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 Accessibility

New Type: Accessibility.AXAnimatedImagesUtilities

public static class AXAnimatedImagesUtilities {
	// properties
	public static Foundation.NSString AnimatedImagesEnabledDidChangeNotification { get; }
	public static bool Enabled { get; }

	// inner types
	public static class Notifications {
		// methods
		public static Foundation.NSObject ObserveAnimatedImagesEnabledDidChange (System.EventHandler<Foundation.NSNotificationEventArgs> handler);
		public static Foundation.NSObject ObserveAnimatedImagesEnabledDidChange (Foundation.NSObject objectToObserve, System.EventHandler<Foundation.NSNotificationEventArgs> handler);
	}
}

New Type: Accessibility.AXCustomContentProvider_Extensions

public static class AXCustomContentProvider_Extensions {
	// methods
	public static System.Func<AXCustomContent[]> GetAccessibilityCustomContentHandler (this IAXCustomContentProvider This);
	public static void SetAccessibilityCustomContentHandler (this IAXCustomContentProvider This, System.Func<AXCustomContent[]> value);
}

Namespace AudioToolbox

Type Changed: AudioToolbox.AudioChannelLayoutTag

Added values:

Ogg_3_0 = 9830403,
Ogg_4_0 = 12124164,
Ogg_5_0 = 13893637,
Ogg_5_1 = 13959174,
Ogg_6_1 = 14024711,
Ogg_7_1 = 14090248,

Namespace CloudKit

Type Changed: CloudKit.CKShareMetadata

Obsoleted constructors:

 [Obsolete ("Get them from 'CKFetchShareMetadataOperation' or platform-specific scene / app delegate callbacks.")]
 public CKShareMetadata ();

Namespace Contacts

Type Changed: Contacts.CNErrorCode

Added value:

FeatureNotAvailable = 104,

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.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 SdkVersion = "9.4";
+public const string SdkVersion = "10.0";
-public const string Version = "16.4.0";
+public const string Version = "16.99.0";

Added field:

public static const string SymbolsLibrary = "/System/Library/Frameworks/Symbols.framework/Symbols";

Namespace SceneKit

Type Changed: SceneKit.SCNSceneRenderer

Added property:

public virtual CoreGraphics.CGColorSpace WorkingColorSpace { get; }

Type Changed: SceneKit.SCNSceneRenderer_Extensions

Added method:

public static CoreGraphics.CGColorSpace GetWorkingColorSpace (this ISCNSceneRenderer This);

Namespace StoreKit

Type Changed: StoreKit.SKCloudServiceController

Added constructor:

public SKCloudServiceController ();

Namespace WatchKit

Type Changed: WatchKit.WKInterfaceSCNScene

Added property:

public virtual CoreGraphics.CGColorSpace WorkingColorSpace { get; }

New Namespace Symbols

New Type: Symbols.NSSymbolAppearEffect

public class NSSymbolAppearEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolAppearEffect (Foundation.NSCoder coder);
	protected NSSymbolAppearEffect (Foundation.NSObjectFlag t);
	protected NSSymbolAppearEffect (IntPtr handle);
	// properties
	public virtual NSSymbolAppearEffect ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolAppearEffect WholeSymbol { get; }
	// methods
	public static NSSymbolAppearEffect Create ();
	public static NSSymbolAppearEffect CreateAppearDownEffect ();
	public static NSSymbolAppearEffect CreateAppearUpEffect ();
}

New Type: Symbols.NSSymbolAutomaticContentTransition

public class NSSymbolAutomaticContentTransition : Symbols.NSSymbolContentTransition {
	// constructors
	public NSSymbolAutomaticContentTransition (Foundation.NSCoder coder);
	protected NSSymbolAutomaticContentTransition (Foundation.NSObjectFlag t);
	protected NSSymbolAutomaticContentTransition (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	// methods
	public static NSSymbolAutomaticContentTransition Create ();
}

New Type: Symbols.NSSymbolBounceEffect

public class NSSymbolBounceEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolBounceEffect (Foundation.NSCoder coder);
	protected NSSymbolBounceEffect (Foundation.NSObjectFlag t);
	protected NSSymbolBounceEffect (IntPtr handle);
	// properties
	public virtual NSSymbolBounceEffect ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolBounceEffect WholeSymbol { get; }
	// methods
	public static NSSymbolBounceEffect Create ();
	public static NSSymbolBounceEffect CreateBounceDownEffect ();
	public static NSSymbolBounceEffect CreateBounceUpEffect ();
}

New Type: Symbols.NSSymbolContentTransition

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

New Type: Symbols.NSSymbolDisappearEffect

public class NSSymbolDisappearEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolDisappearEffect (Foundation.NSCoder coder);
	protected NSSymbolDisappearEffect (Foundation.NSObjectFlag t);
	protected NSSymbolDisappearEffect (IntPtr handle);
	// properties
	public virtual NSSymbolDisappearEffect ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolDisappearEffect WholeSymbol { get; }
	// methods
	public static NSSymbolDisappearEffect Create ();
	public static NSSymbolDisappearEffect CreateDisappearDownEffect ();
	public static NSSymbolDisappearEffect CreateDisappearUpEffect ();
}

New Type: Symbols.NSSymbolEffect

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

New Type: Symbols.NSSymbolEffectOptions

public class NSSymbolEffectOptions : Foundation.NSObject, Foundation.INSCoding, Foundation.INSCopying, Foundation.INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSSymbolEffectOptions (Foundation.NSCoder coder);
	protected NSSymbolEffectOptions (Foundation.NSObjectFlag t);
	protected NSSymbolEffectOptions (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	// methods
	public virtual Foundation.NSObject Copy (Foundation.NSZone zone);
	public static NSSymbolEffectOptions Create ();
	public static NSSymbolEffectOptions Create (double speed);
	public static NSSymbolEffectOptions Create (nint repeatCount);
	public static NSSymbolEffectOptions CreateNonRepeating ();
	public static NSSymbolEffectOptions CreateRepeating ();
	public virtual void EncodeTo (Foundation.NSCoder encoder);
	public virtual NSSymbolEffectOptions Get (double speed);
	public virtual NSSymbolEffectOptions Get (nint repeatCount);
	public virtual NSSymbolEffectOptions GetNonRepeating ();
	public virtual NSSymbolEffectOptions GetRepeating ();
}

New Type: Symbols.NSSymbolPulseEffect

public class NSSymbolPulseEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolPulseEffect (Foundation.NSCoder coder);
	protected NSSymbolPulseEffect (Foundation.NSObjectFlag t);
	protected NSSymbolPulseEffect (IntPtr handle);
	// properties
	public virtual NSSymbolPulseEffect ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolPulseEffect WholeSymbol { get; }
	// methods
	public static NSSymbolPulseEffect Create ();
}

New Type: Symbols.NSSymbolReplaceContentTransition

public class NSSymbolReplaceContentTransition : Symbols.NSSymbolContentTransition {
	// constructors
	public NSSymbolReplaceContentTransition (Foundation.NSCoder coder);
	protected NSSymbolReplaceContentTransition (Foundation.NSObjectFlag t);
	protected NSSymbolReplaceContentTransition (IntPtr handle);
	// properties
	public virtual NSSymbolReplaceContentTransition ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolReplaceContentTransition WholeSymbol { get; }
	// methods
	public static NSSymbolReplaceContentTransition Create ();
	public static NSSymbolReplaceContentTransition CreateReplaceDownUpTransition ();
	public static NSSymbolReplaceContentTransition CreateReplaceOffUpTransition ();
	public static NSSymbolReplaceContentTransition CreateReplaceUpUpTransition ();
}

New Type: Symbols.NSSymbolScaleEffect

public class NSSymbolScaleEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolScaleEffect (Foundation.NSCoder coder);
	protected NSSymbolScaleEffect (Foundation.NSObjectFlag t);
	protected NSSymbolScaleEffect (IntPtr handle);
	// properties
	public virtual NSSymbolScaleEffect ByLayer { get; }
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolScaleEffect WholeSymbol { get; }
	// methods
	public static NSSymbolScaleEffect Create ();
	public static NSSymbolScaleEffect CreateScaleDownEffect ();
	public static NSSymbolScaleEffect CreateScaleUpEffect ();
}

New Type: Symbols.NSSymbolVariableColorEffect

public class NSSymbolVariableColorEffect : Symbols.NSSymbolEffect {
	// constructors
	public NSSymbolVariableColorEffect (Foundation.NSCoder coder);
	protected NSSymbolVariableColorEffect (Foundation.NSObjectFlag t);
	protected NSSymbolVariableColorEffect (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual NSSymbolVariableColorEffect Cumulative { get; }
	public virtual NSSymbolVariableColorEffect DimInactiveLayers { get; }
	public virtual NSSymbolVariableColorEffect HideInactiveLayers { get; }
	public virtual NSSymbolVariableColorEffect Iterative { get; }
	public virtual NSSymbolVariableColorEffect NonReversing { get; }
	public virtual NSSymbolVariableColorEffect Reversing { get; }
	// methods
	public static NSSymbolVariableColorEffect Create ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment