Search code examples
windows-store-appsuwpwindows-store

Specify MemoryDependency UWP App


I have a UWP app generated from Unity. I want to limit the availability of my app based on Memory, since it does not run well on less then 1gb. I found this MemoryDependency, but I am not able to apply it in the code of the package.appxmanifest, can somebody tell how this is done?


Solution

  • You were on the right Track. Below are the steps.

    To validate your StoreManifest.xml, create a new xml document in Microsoft Visual Studio and add the following declaration:

    http://schemas.microsoft.com/appx/2015/StoreManifest namespace

    Below is the StoreManifest.xml for Devices with Min 1 GB

    <?xml version="1.0" encoding="utf-8"?>
    <StoreManifest xmlns="http://schemas.microsoft.com/appx/2015/StoreManifest">
      <Dependencies>
        <MemoryDependency MinForeground="300MB" />
      </Dependencies>
    </StoreManifest>
    

    Below is the Table for Declaring MemoryDependency

    For mobile devices, the value indicates the requirements for available memory. The equivalent requirements for installed memory on mobile devices are as follows:

    • 300MB = device must have at least 1 GB of installed memory
    • 750MB = device must have at least 2 GB of installed memory
    • 1000MB = device must have at least 3 GB of installed memory
    • 2000MB = device must have at least 4 GB of installed memory

    For example, if you specify that your UWP app requires 300 MB to run properly, it will only be able to be installed on mobile devices with >1 GB of RAM or on desktop devices with >300 MB of RAM.

    More Information and Configuration on how to do this is here