Skip to content

Instantly share code, notes, and snippets.

View lewishalliday's full-sized avatar
🧑‍💻

Lewis Halliday lewishalliday

🧑‍💻
View GitHub Profile
@lewishalliday
lewishalliday / DeviceModel.cs
Created July 16, 2020 08:53
Xamarin Forms - Get iOS Device Model Pretty Name (i.e iPhone 11)
public class DeviceModel
{
public string GetDevice()
{
try
{
if (Device.RuntimePlatform == Device.iOS)
{
var json = new WebClient().DownloadString("https://raw.githubusercontent.com/fieldnotescommunities/ios-device-identifiers/master/ios-device-identifiers.json");
var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);