xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 505 forks source link

[Bug] Incorrect DeviceInfo.Model for iOS Simulator #1347

Open darrabam opened 4 years ago

darrabam commented 4 years ago

Description

Xamarin.Essentials.DeviceInfo.Model reports Model = "x86_64", although the simulator reports model name correctly in Settings -> About. (screen shot below)

Steps to Reproduce

  1. Make a blank project
  2. Call Xamarin.Essentials.DeviceInfo.Model

Expected Behavior

DeviceInfo.Model reports the device model as reported by the simulator.

Actual Behavior

DeviceInfo.Model reports Model = "x86_64"

Basic Information

Screenshots

image

Redth commented 4 years ago

I'm not sure we can do much here. We are just reporting back what the API's give us. In this case, this kind of makes sense since it's a simulator which is the model, and the x64 simulator at that (perhaps we'll see arm64 as the model in Apple Silicon simulator models).

jamesmontemagno commented 4 years ago

Agreed here.

taublast commented 3 years ago

I guess the value @darrabam asked for is found here: Foundation.NSProcessInfo.ProcessInfo.Environment["SIMULATOR_MODEL_IDENTIFIER"];

https://github.com/dannycabrera/Get-iOS-Model

jamesmontemagno commented 3 years ago

Can look into this ^

JamesMerlin commented 3 years ago

Any updates on this @jamesmontemagno? 😄