Forum Xamarin.Forms

Is There a way to differentiate iphone 5, iphone 6 and 6+

Hi Folks,

Is there a way to know at run time what device it is. I know how to differentiate iPhone and iPad, but how to differentiate iphone5, 6 and 6+?

Thank you

Best Answer


  • adamkempadamkemp USInsider, Developer Group Leader mod

    An obvious difference is that they all have different screen sizes ( Aside from that you can look at approaches like this and adapting them to Xamarin as needed.

    Obviously all of this code would need to be done in a platform-specific assembly and then somehow communicated to your Xamarin.Forms PCL code.

  • SKallSKall USMember ✭✭✭✭
    Accepted Answer

    If you use sysctlbyname you can read the hw.machine value. iPhone 6 is "iPhone7,2" and 6+ is "iPhone7,1". As mentioned in your other thread:

Sign In or Register to comment.