Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created August 4, 2022 16:38
Show Gist options
  • Save vs-mobiletools-engineering-service2/3a81beb2d7de61ea3b7048de0f21930b to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/3a81beb2d7de61ea3b7048de0f21930b to your computer and use it in GitHub Desktop.
previous-api-comparison/watchos-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.WatchOS SDK API diff
List of API changes for Xamarin.WatchOS.
spouliot
sepoulio
8/4/2022
article
289956a5-831b-6f5b-d311-9cb0809a0070
xamarin

Xamarin.WatchOS SDK API diff

Namespace CoreText

Type Changed: CoreText.CTFontOptions

Added value:

PreventAutoDownload = 2,

Namespace Foundation

Type Changed: Foundation.NSActivityOptions

Added values:

AnimationTrackingEnabled = 35184372088832,
TrackingEnabled = 70368744177664,
UserInteractive = 1095233437695,

Type Changed: Foundation.NSAttributedString

Added constructors:

public NSAttributedString (NSData markdown, NSAttributedStringMarkdownParsingOptions options, NSUrl baseUrl, out NSError error);
public NSAttributedString (NSUrl markdownFile, NSAttributedStringMarkdownParsingOptions options, NSUrl baseUrl, out NSError error);
public NSAttributedString (string markdownString, NSAttributedStringMarkdownParsingOptions options, NSUrl baseUrl, out NSError error);

Added property:

public virtual NSAttributedString AttributedStringByInflectingString { get; }

Type Changed: Foundation.NSBundle

Added method:

public virtual NSAttributedString GetLocalizedAttributedString (string key, string value, string tableName);

Type Changed: Foundation.NSByteCountFormatter

Added methods:

public virtual string Create (NSUnitInformationStorage measurement);
public static string Create (NSUnitInformationStorage measurement, NSByteCountFormatterCountStyle countStyle);

Type Changed: Foundation.NSCocoaError

Added value:

XpcConnectionCodeSigningRequirementFailure = 4102,

Type Changed: Foundation.NSJsonReadingOptions

Added values:

Json5Allowed = 8,
TopLevelDictionaryAssumed = 16,

Type Changed: Foundation.NSMutableUrlRequest

Added property:

public virtual NSURLRequestAttribution Attribution { get; set; }

Type Changed: Foundation.NSPersonNameComponentsFormatter

Added property:

public virtual NSLocale Locale { get; set; }

Type Changed: Foundation.NSProgress

Added property:

public static NSString FileOperationKindDuplicatingKey { get; }

Type Changed: Foundation.NSUrlBookmarkCreationOptions

Added value:

CreationWithoutImplicitSecurityScope = 536870912,

Type Changed: Foundation.NSUrlBookmarkResolutionOptions

Added value:

WithoutImplicitStartAccessing = 32768,

Type Changed: Foundation.NSUrlComponents

Added property:

public virtual string EncodedHost { get; set; }

Type Changed: Foundation.NSUrlRequest

Added property:

public virtual NSURLRequestAttribution Attribution { get; }

Type Changed: Foundation.NSUrlSessionConfiguration

Added property:

public virtual bool RequiresDnsSecValidation { get; set; }

Type Changed: Foundation.NSUrlSessionTask

Added properties:

public INSUrlSessionTaskDelegate Delegate { get; set; }
public virtual NSObject WeakDelegate { get; set; }

Type Changed: Foundation.NSUrlSessionTaskDelegate

Added method:

public virtual void DidCreateTask (NSUrlSession session, NSUrlSessionTask task);

Type Changed: Foundation.NSUrlSessionTaskDelegate_Extensions

Added method:

public static void DidCreateTask (this INSUrlSessionTaskDelegate This, NSUrlSession session, NSUrlSessionTask task);

Type Changed: Foundation.NSUuid

Added method:

public virtual NSComparisonResult Compare (NSUuid otherUuid);

Type Changed: Foundation.NSXpcConnection

Added method:

public virtual void Activate ();

Type Changed: Foundation.NSXpcListener

Added method:

public virtual void Activate ();

New Type: Foundation.NSAttributedStringFormattingOptions

[Serializable]
[Flags]
public enum NSAttributedStringFormattingOptions {
	ApplyReplacementIndexAttribute = 2,
	InsertArgumentAttributesWithoutMerging = 1,
}

New Type: Foundation.NSAttributedStringMarkdownInterpretedSyntax

[Serializable]
public enum NSAttributedStringMarkdownInterpretedSyntax {
	Full = 0,
	InlineOnly = 1,
	InlineOnlyPreservingWhitespace = 2,
}

New Type: Foundation.NSAttributedStringMarkdownParsingFailurePolicy

[Serializable]
public enum NSAttributedStringMarkdownParsingFailurePolicy {
	Error = 0,
	PartiallyParsedIfPossible = 1,
}

New Type: Foundation.NSAttributedStringMarkdownParsingOptions

public class NSAttributedStringMarkdownParsingOptions : Foundation.NSObject, INSCopying, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSAttributedStringMarkdownParsingOptions ();
	protected NSAttributedStringMarkdownParsingOptions (NSObjectFlag t);
	protected NSAttributedStringMarkdownParsingOptions (IntPtr handle);
	// properties
	public virtual bool AllowsExtendedAttributes { get; set; }
	public virtual bool AppliesSourcePositionAttributes { get; set; }
	public override IntPtr ClassHandle { get; }
	public virtual NSAttributedStringMarkdownParsingFailurePolicy FailurePolicy { get; set; }
	public virtual NSAttributedStringMarkdownInterpretedSyntax InterpretedSyntax { get; set; }
	public virtual string LanguageCode { get; set; }
	// methods
	public virtual NSObject Copy (NSZone zone);
}

New Type: Foundation.NSAttributedStringMarkdownSourcePosition

public class NSAttributedStringMarkdownSourcePosition : Foundation.NSObject, INSCoding, INSCopying, INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSAttributedStringMarkdownSourcePosition ();
	public NSAttributedStringMarkdownSourcePosition (NSCoder coder);
	protected NSAttributedStringMarkdownSourcePosition (NSObjectFlag t);
	protected NSAttributedStringMarkdownSourcePosition (IntPtr handle);
	public NSAttributedStringMarkdownSourcePosition (nint startLine, nint startColumn, nint endLine, nint endColumn);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual nint EndColumn { get; }
	public virtual nint EndLine { get; }
	public virtual nint StartColumn { get; }
	public virtual nint StartLine { get; }
	// methods
	public virtual NSObject Copy (NSZone zone);
	public virtual void EncodeTo (NSCoder encoder);
	public virtual NSRange RangeInString (string string);
}

New Type: Foundation.NSAttributedStringNameKey

[Serializable]
public enum NSAttributedStringNameKey {
	AlternateDescription = 0,
	ImageUrl = 1,
	InflectionAlternative = 3,
	InflectionRule = 2,
	InlinePresentationIntent = 4,
	LanguageIdentifier = 5,
	MarkdownSourcePosition = 6,
	Morphology = 7,
	PresentationIntentAttributeName = 8,
	ReplacementIndex = 9,
}

New Type: Foundation.NSAttributedStringNameKeyExtensions

public static class NSAttributedStringNameKeyExtensions {
	// methods
	public static NSString GetConstant (this NSAttributedStringNameKey self);
	public static NSAttributedStringNameKey GetValue (NSString constant);
}

New Type: Foundation.NSGrammaticalGender

[Serializable]
public enum NSGrammaticalGender {
	Feminine = 1,
	Masculine = 2,
	Neuter = 3,
	NotSet = 0,
}

New Type: Foundation.NSGrammaticalNumber

[Serializable]
public enum NSGrammaticalNumber {
	NotSet = 0,
	Plural = 3,
	PluralFew = 5,
	PluralMany = 6,
	PluralTwo = 4,
	Singular = 1,
	Zero = 2,
}

New Type: Foundation.NSGrammaticalPartOfSpeech

[Serializable]
public enum NSGrammaticalPartOfSpeech {
	Abbreviation = 14,
	Adjective = 6,
	Adposition = 7,
	Adverb = 4,
	Conjunction = 10,
	Determiner = 1,
	Interjection = 12,
	Letter = 3,
	NotSet = 0,
	Noun = 9,
	Numeral = 11,
	Particle = 5,
	Preposition = 13,
	Pronoun = 2,
	Verb = 8,
}

New Type: Foundation.NSInflectionRule

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

New Type: Foundation.NSInflectionRuleExplicit

public class NSInflectionRuleExplicit : Foundation.NSInflectionRule {
	// constructors
	public NSInflectionRuleExplicit ();
	public NSInflectionRuleExplicit (NSCoder coder);
	public NSInflectionRuleExplicit (NSMorphology morphology);
	protected NSInflectionRuleExplicit (NSObjectFlag t);
	protected NSInflectionRuleExplicit (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual NSMorphology Morphology { get; }
}

New Type: Foundation.NSInlinePresentationIntent

[Serializable]
public enum NSInlinePresentationIntent {
	BlockHTML = 512,
	Code = 4,
	Emphasized = 1,
	InlineHTML = 256,
	LineBreak = 128,
	SoftBreak = 64,
	Strikethrough = 32,
	StronglyEmphasized = 2,
}

New Type: Foundation.NSMorphology

public class NSMorphology : Foundation.NSObject, INSCoding, INSCopying, INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSMorphology ();
	public NSMorphology (NSCoder coder);
	protected NSMorphology (NSObjectFlag t);
	protected NSMorphology (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual NSGrammaticalGender GrammaticalGender { get; set; }
	public virtual NSGrammaticalNumber Number { get; set; }
	public virtual NSGrammaticalPartOfSpeech PartOfSpeech { get; set; }
	public virtual bool Unspecified { get; }
	public static NSMorphology UserMorphology { get; }
	// methods
	public virtual NSObject Copy (NSZone zone);
	public virtual void EncodeTo (NSCoder encoder);
	public virtual NSMorphologyCustomPronoun GetCustomPronoun (string language);
	public virtual bool SetCustomPronoun (NSMorphologyCustomPronoun features, string language, out NSError error);
}

New Type: Foundation.NSMorphologyCustomPronoun

public class NSMorphologyCustomPronoun : Foundation.NSObject, INSCoding, INSCopying, INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSMorphologyCustomPronoun ();
	public NSMorphologyCustomPronoun (NSCoder coder);
	protected NSMorphologyCustomPronoun (NSObjectFlag t);
	protected NSMorphologyCustomPronoun (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual string ObjectForm { get; set; }
	public virtual string PossessiveAdjectiveForm { get; set; }
	public virtual string PossessiveForm { get; set; }
	public virtual string ReflexiveForm { get; set; }
	public virtual string SubjectForm { get; set; }
	// methods
	public virtual NSObject Copy (NSZone zone);
	public virtual void EncodeTo (NSCoder encoder);
	public static string[] GetRequiredKeysForLanguage (string language);
	public static bool IsSupported (string language);
}

New Type: Foundation.NSPresentationIntent

public class NSPresentationIntent : Foundation.NSObject, INSCoding, INSCopying, INSSecureCoding, ObjCRuntime.INativeObject, System.IDisposable {
	// constructors
	public NSPresentationIntent (NSCoder coder);
	protected NSPresentationIntent (NSObjectFlag t);
	protected NSPresentationIntent (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual nint Column { get; }
	public virtual NSNumber[] ColumnAlignments { get; }
	public virtual nint ColumnCount { get; }
	public virtual nint HeaderLevel { get; }
	public virtual nint Identity { get; }
	public virtual nint IndentationLevel { get; }
	public virtual NSPresentationIntentKind IntentKind { get; }
	public virtual string LanguageHint { get; }
	public virtual nint Ordinal { get; }
	public virtual NSPresentationIntent ParentIntent { get; }
	public virtual nint Row { get; }
	// methods
	public virtual NSObject Copy (NSZone zone);
	public static NSPresentationIntent CreateBlockQuoteIntent (nint identity, NSPresentationIntent parent);
	public static NSPresentationIntent CreateCodeBlockIntent (nint identity, string languageHint, NSPresentationIntent parent);
	public static NSPresentationIntent CreateHeaderIntent (nint identity, nint level, NSPresentationIntent parent);
	public static NSPresentationIntent CreateListItemIntent (nint identity, nint ordinal, NSPresentationIntent parent);
	public static NSPresentationIntent CreateOrderedListIntent (nint identity, NSPresentationIntent parent);
	public static NSPresentationIntent CreateParagraphIntent (nint identity, NSPresentationIntent parent);
	public static NSPresentationIntent CreateTableCellIntent (nint identity, nint column, NSPresentationIntent parent);
	public static NSPresentationIntent CreateTableHeaderRowIntent (nint identity, NSPresentationIntent parent);
	public static NSPresentationIntent CreateTableIntent (nint identity, nint columnCount, NSNumber[] alignments, NSPresentationIntent parent);
	public static NSPresentationIntent CreateTableRowIntent (nint identity, nint row, NSPresentationIntent parent);
	public static NSPresentationIntent CreateThematicBreakIntent (nint identity, NSPresentationIntent parent);
	public static NSPresentationIntent CreateUnorderedListIntent (nint identity, NSPresentationIntent parent);
	public virtual void EncodeTo (NSCoder encoder);
	public virtual bool IsEquivalent (NSPresentationIntent other);
}

New Type: Foundation.NSPresentationIntentKind

[Serializable]
public enum NSPresentationIntentKind {
	BlockQuote = 6,
	CodeBlock = 5,
	Header = 1,
	ListItem = 4,
	OrderedList = 2,
	Paragraph = 0,
	Table = 8,
	TableCell = 11,
	TableHeaderRow = 9,
	TableRow = 10,
	ThematicBreak = 7,
	UnorderedList = 3,
}

New Type: Foundation.NSPresentationIntentTableColumnAlignment

[Serializable]
public enum NSPresentationIntentTableColumnAlignment {
	Center = 1,
	Left = 0,
	Right = 2,
}

New Type: Foundation.NSURLRequestAttribution

[Serializable]
public enum NSURLRequestAttribution {
	Developer = 0,
	User = 1,
}

Namespace ShazamKit

Type Changed: ShazamKit.SHErrorCode

Added value:

InternalError = 500,

Type Changed: ShazamKit.SHMediaItem

Added properties:

public virtual SHRange[] FrequencySkewRanges { get; }
public virtual SHRange[] TimeRanges { get; }

Type Changed: ShazamKit.SHMediaItemProperty

Added values:

FrequencySkewRanges = 15,
TimeRanges = 14,

Type Changed: ShazamKit.SHSignatureGenerator

Added methods:

public static void GenerateSignature (AVFoundation.AVAsset asset, System.Action<SHSignature,Foundation.NSError> completionHandler);
public static System.Threading.Tasks.Task<SHSignature> GenerateSignatureAsync (AVFoundation.AVAsset asset);

New Type: ShazamKit.SHRange

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

Namespace UniformTypeIdentifiers

Type Changed: UniformTypeIdentifiers.UTType

Added properties:

public static UTType SHCustomCatalogContentType { get; }
public static UTType SHSignatureContentType { get; }

Namespace UserNotifications

Type Changed: UserNotifications.UNNotificationInterruptionLevel

Obsoleted fields:

 [Obsolete ("Use 'Active2'.")]
 Active = 0,
 [Obsolete ("Use 'Critical2'.")]
 Critical = 1,
 [Obsolete ("Use 'Passive2'.")]
 Passive = 2,
 [Obsolete ("Use 'TimeSensitive2'.")]
 TimeSensitive = 3,

Added values:

Active2 = 1,
Critical2 = 3,
Passive2 = 0,
TimeSensitive2 = 2,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment