From f19a8a3cc5158a7a1768a86ad69e3185efc4b357 Mon Sep 17 00:00:00 2001 From: kspearrin Date: Sat, 29 Sep 2018 12:14:44 -0400 Subject: [PATCH] os version checks on auth service apis --- src/iOS/AppDelegate.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/iOS/AppDelegate.cs b/src/iOS/AppDelegate.cs index 460a0905b..f4b3eca7f 100644 --- a/src/iOS/AppDelegate.cs +++ b/src/iOS/AppDelegate.cs @@ -149,7 +149,7 @@ namespace Bit.iOS MessagingCenter.Subscribe( Xamarin.Forms.Application.Current, "FullSyncCompleted", async (sender, successfully) => { - if(successfully) + if(_deviceInfoService.Version >= 12 && successfully) { await ASHelpers.ReplaceAllIdentities(_cipherService); } @@ -158,7 +158,7 @@ namespace Bit.iOS MessagingCenter.Subscribe>( Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) => { - if(await ASHelpers.IdentitiesCanIncremental()) + if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental()) { if(data.Item2) { @@ -178,7 +178,7 @@ namespace Bit.iOS MessagingCenter.Subscribe( Xamarin.Forms.Application.Current, "DeletedCipher", async (sender, cipher) => { - if(await ASHelpers.IdentitiesCanIncremental()) + if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental()) { var identity = ASHelpers.ToCredentialIdentity(cipher); if(identity == null) @@ -195,7 +195,9 @@ namespace Bit.iOS MessagingCenter.Subscribe( Xamarin.Forms.Application.Current, "LoggedOut", async (sender) => { - await ASCredentialIdentityStore.SharedStore.RemoveAllCredentialIdentitiesAsync(); + if(_deviceInfoService.Version >= 12) { + await ASCredentialIdentityStore.SharedStore.RemoveAllCredentialIdentitiesAsync(); + } }); ZXing.Net.Mobile.Forms.iOS.Platform.Init();