1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 00:33:20 +00:00

add type to deviceinfo to avoid using XF

This commit is contained in:
Kyle Spearrin
2017-12-21 13:10:55 -05:00
parent 379a82972a
commit 2b4ffaa357
6 changed files with 14 additions and 5 deletions

View File

@@ -7,14 +7,14 @@ namespace Bit.iOS.Core.Services
{
public class DeviceInfoService : IDeviceInfoService
{
public string Type => Xamarin.Forms.Device.iOS;
public string Model => UIDevice.CurrentDevice.Model;
public int Version
{
get
{
int version;
var versionParts = UIDevice.CurrentDevice.SystemVersion.Split('.');
if(versionParts.Length > 0 && int.TryParse(versionParts[0], out version))
if(versionParts.Length > 0 && int.TryParse(versionParts[0], out int version))
{
return version;
}