2016-08-24 05:43:17 +03:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-08-26 04:43:47 +03:00
|
|
|
|
public float Scale => (float)UIScreen.MainScreen.Scale;
|
2017-06-28 15:27:06 +03:00
|
|
|
|
public bool NfcEnabled => false;
|
2017-09-07 07:33:19 +03:00
|
|
|
|
public bool HasCamera => true;
|
2016-08-24 05:43:17 +03:00
|
|
|
|
}
|
|
|
|
|
}
|