#UWP – Single source code line to find if our app is on Desktop, #IoT, Mobile, or #XBox


Working with Universal Apps is quite grateful. However, before the build 10.0.10240.0, trying to find out the kind of platform that our app was running was a bit complicated.

Today we can solve it with a single line of code, using AnalyticsVersionInfo. In example:

return Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily;


It returns us a value of the type:

  • Windows.Desktop
  • Windows.IoT
  • Windows.Mobile
  • Windows.Xbox

And with that we can now continue working. It is most common in this case, is the decision to use a specific API in a platform.

Greetings @ Madrid

-El Bruno


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: