Windows 10 UWP for targeting Windows 10 only for mobile devices

Is it possible to target the uwp app only for Windows 10 mobile? I mean, can we configure in the manifest to work only with the phone, and not with the tablet or desktop? In addition, users should not search for the application in the store from a tablet, desktop, etc., but only from the phone.

+5
source share
3 answers

There is an entry in Package.appxmanifest indicating which device families your application is targeting. Unfortunately, it does not appear in the editor, so you will need to edit the XML directly. This is the entry you need to change:

 <Dependencies> <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> </Dependencies> 

Replace Windows.Universal with Windows.Mobile . See the help documentation for more details.

In addition, when you are preparing a presentation for the store, you can choose which device families you want your application to be available for:

Choosing a Windows 10 device family in a store

+14
source

Take a look at the MSDN page it is indicated directly from there.

You may not want your application to run on a wide range of devices; perhaps he specializes, for example, on a desktop PC or on an Xbox console. In this case, you can target your application to one of the child devices. For example, if you target the desktop device family, the APIs that will be available for your application include APIs inherited from the generic device family, plus the APIs specific to the desktop device family.

0
source

This is one of the interesting things about UWP. We have the ability to configure tons of devices (phones, tablets, desktops, Xbox and HoloLense) with the same code base. This is a big sale if you are currently deciding whether to build for Windows 10 and other platforms. However, yes, you can decide whether you want a particular application to be on mobile devices (although the term "mobile" is now so ambiguous) or the desktop.

0
source

Source: https://habr.com/ru/post/1238479/


All Articles