using AuthenticationServices; using Foundation; using UIKit; namespace Bit.iOS.Core.Utilities { public static class ASCredentialIdentityStoreExtensions { /// /// Saves password credential identities to the shared store of /// Note: This is added to provide the proper method depending on the OS version. /// /// Password identities to save public static Task> SaveCredentialIdentitiesAsync(params ASPasswordCredentialIdentity[] identities) { if (UIDevice.CurrentDevice.CheckSystemVersion(17, 0)) { return ASCredentialIdentityStore.SharedStore.SaveCredentialIdentityEntriesAsync(identities); } return ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(identities); } /// /// Removes password credential identities of the shared store of /// Note: This is added to provide the proper method depending on the OS version. /// /// Password identities to remove public static Task> RemoveCredentialIdentitiesAsync(params ASPasswordCredentialIdentity[] identities) { if (UIDevice.CurrentDevice.CheckSystemVersion(17, 0)) { return ASCredentialIdentityStore.SharedStore.RemoveCredentialIdentityEntriesAsync(identities); } return ASCredentialIdentityStore.SharedStore.RemoveCredentialIdentitiesAsync(identities); } } }