bitwarden-android/src/iOS.Core/Services/DeviceInfoService.cs

30 lines
850 B
C#
Raw Normal View History

using Bit.App.Abstractions;
using UIKit;
namespace Bit.iOS.Core.Services
{
public class DeviceInfoService : IDeviceInfoService
{
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))
{
return version;
}
// unable to determine version
return -1;
}
}
public float Scale => (float)UIScreen.MainScreen.Scale;
2017-06-28 15:27:06 +03:00
public bool NfcEnabled => false;
public bool HasCamera => true;
2017-11-28 01:27:11 +03:00
public bool AutofillServiceSupported => false;
}
}