Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created March 14, 2024 11:00
Show Gist options
  • Save vs-mobiletools-engineering-service2/90d9c5f3e7e8ca6d2eb86cdedad1f786 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/90d9c5f3e7e8ca6d2eb86cdedad1f786 to your computer and use it in GitHub Desktop.
previous-api-comparison/ios-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.iOS SDK API diff
List of API changes for Xamarin.iOS.
spouliot
sepoulio
3/14/2024
article
f7934223-2a8c-d5d4-788f-79d2f8610aa7
xamarin

Xamarin.iOS SDK API diff

Namespace ObjCRuntime

Type Changed: ObjCRuntime.Constants

Added field:

public static const string SafetyKitLibrary = "/System/Library/Frameworks/SafetyKit.framework/SafetyKit";

New Namespace SafetyKit

New Type: SafetyKit.ISACrashDetectionDelegate

public interface ISACrashDetectionDelegate : ObjCRuntime.INativeObject, System.IDisposable {
}

New Type: SafetyKit.ISAEmergencyResponseDelegate

public interface ISAEmergencyResponseDelegate : ObjCRuntime.INativeObject, System.IDisposable {
}

New Type: SafetyKit.SAAuthorizationStatus

[Serializable]
public enum SAAuthorizationStatus {
	Authorized = 2,
	Denied = 1,
	NotDetermined = 0,
}

New Type: SafetyKit.SACrashDetectionDelegate

public class SACrashDetectionDelegate : Foundation.NSObject, ObjCRuntime.INativeObject, ISACrashDetectionDelegate, System.IDisposable {
	// constructors
	public SACrashDetectionDelegate ();
	protected SACrashDetectionDelegate (Foundation.NSObjectFlag t);
	protected SACrashDetectionDelegate (IntPtr handle);
	// methods
	public virtual void DidDetectEvent (SACrashDetectionManager crashDetectionManager, SACrashDetectionEvent event);
}

New Type: SafetyKit.SACrashDetectionDelegate_Extensions

public static class SACrashDetectionDelegate_Extensions {
	// methods
	public static void DidDetectEvent (this ISACrashDetectionDelegate This, SACrashDetectionManager crashDetectionManager, SACrashDetectionEvent event);
}

New Type: SafetyKit.SACrashDetectionEvent

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

New Type: SafetyKit.SACrashDetectionEventResponse

[Serializable]
public enum SACrashDetectionEventResponse {
	Attempted = 0,
	Disabled = 1,
}

New Type: SafetyKit.SACrashDetectionManager

public class SACrashDetectionManager : Foundation.NSObject {
	// constructors
	public SACrashDetectionManager ();
	protected SACrashDetectionManager (Foundation.NSObjectFlag t);
	protected SACrashDetectionManager (IntPtr handle);
	// properties
	public virtual SAAuthorizationStatus AuthorizationStatus { get; }
	public static bool Available { get; }
	public override IntPtr ClassHandle { get; }
	public ISACrashDetectionDelegate Delegate { get; set; }
	public virtual Foundation.NSObject WeakDelegate { get; set; }
	// methods
	protected override void Dispose (bool disposing);
	public virtual void RequestAuthorization (SACrashDetectionManagerRequestAuthorizationCompletionHandler handler);
	public virtual System.Threading.Tasks.Task<SAAuthorizationStatus> RequestAuthorizationAsync ();
}

New Type: SafetyKit.SACrashDetectionManagerRequestAuthorizationCompletionHandler

public sealed delegate SACrashDetectionManagerRequestAuthorizationCompletionHandler : System.MulticastDelegate {
	// constructors
	public SACrashDetectionManagerRequestAuthorizationCompletionHandler (object object, IntPtr method);
	// methods
	public virtual System.IAsyncResult BeginInvoke (SAAuthorizationStatus status, Foundation.NSError error, System.AsyncCallback callback, object object);
	public virtual void EndInvoke (System.IAsyncResult result);
	public virtual void Invoke (SAAuthorizationStatus status, Foundation.NSError error);
}

New Type: SafetyKit.SAEmergencyResponseDelegate

public class SAEmergencyResponseDelegate : Foundation.NSObject, ObjCRuntime.INativeObject, ISAEmergencyResponseDelegate, System.IDisposable {
	// constructors
	public SAEmergencyResponseDelegate ();
	protected SAEmergencyResponseDelegate (Foundation.NSObjectFlag t);
	protected SAEmergencyResponseDelegate (IntPtr handle);
	// methods
	public virtual void DidUpdateVoiceCallStatus (SAEmergencyResponseManager emergencyResponseManager, SAEmergencyResponseManagerVoiceCallStatus voiceCallStatus);
}

New Type: SafetyKit.SAEmergencyResponseDelegate_Extensions

public static class SAEmergencyResponseDelegate_Extensions {
	// methods
	public static void DidUpdateVoiceCallStatus (this ISAEmergencyResponseDelegate This, SAEmergencyResponseManager emergencyResponseManager, SAEmergencyResponseManagerVoiceCallStatus voiceCallStatus);
}

New Type: SafetyKit.SAEmergencyResponseManager

public class SAEmergencyResponseManager : Foundation.NSObject {
	// constructors
	public SAEmergencyResponseManager ();
	protected SAEmergencyResponseManager (Foundation.NSObjectFlag t);
	protected SAEmergencyResponseManager (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public ISAEmergencyResponseDelegate Delegate { get; set; }
	public virtual Foundation.NSObject WeakDelegate { get; set; }
	// methods
	public virtual void DialVoiceCall (string phoneNumber, SAEmergencyResponseManagerDialVoiceCallCompletionHandler handler);
	public virtual System.Threading.Tasks.Task<System.Tuple<System.Boolean,Foundation.NSError>> DialVoiceCallAsync (string phoneNumber);
	protected override void Dispose (bool disposing);
}

New Type: SafetyKit.SAEmergencyResponseManagerDialVoiceCallCompletionHandler

public sealed delegate SAEmergencyResponseManagerDialVoiceCallCompletionHandler : System.MulticastDelegate {
	// constructors
	public SAEmergencyResponseManagerDialVoiceCallCompletionHandler (object object, IntPtr method);
	// methods
	public virtual System.IAsyncResult BeginInvoke (bool requestAccepted, Foundation.NSError error, System.AsyncCallback callback, object object);
	public virtual void EndInvoke (System.IAsyncResult result);
	public virtual void Invoke (bool requestAccepted, Foundation.NSError error);
}

New Type: SafetyKit.SAEmergencyResponseManagerVoiceCallStatus

[Serializable]
public enum SAEmergencyResponseManagerVoiceCallStatus {
	Active = 1,
	Dialing = 0,
	Disconnected = 2,
	Failed = 3,
}

New Type: SafetyKit.SAErrorCode

[Serializable]
public enum SAErrorCode {
	InvalidArgument = 3,
	NotAllowed = 2,
	NotAuthorized = 1,
	OperationFailed = 4,
}

New Type: SafetyKit.SAErrorCodeExtensions

public static class SAErrorCodeExtensions {
	// methods
	public static Foundation.NSString GetDomain (this SAErrorCode self);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment