private NativeCredential GetCredentialFromAccount(Account account) { NativeCredential nc = null; try { var serializedNativeCredential = accountManager.GetUserData(account, Constants.STR_CREDENTIAL); nc = NativeCredential.Deserialize(serializedNativeCredential); } catch (Exception e) { throw new KinveyException(EnumErrorCategory.ERROR_USER, EnumErrorCode.ERROR_USER_GET_CREDENTIAL_FOR_ACCOUNT, "", e); } return(nc); }
private NativeCredential GetCredentialFromRecord(SecRecord record) { var serializedNativeCredential = NSString.FromData(record.Generic, NSStringEncoding.UTF8); return(NativeCredential.Deserialize(serializedNativeCredential)); }