CurrentAppSimulator Class

Defines methods and properties used to instantiate an object that you can use to get simulated license info during testing.

Syntax

public ref class CurrentAppSimulator abstract sealed  

Remarks

Until the app has been listed in the Microsoft Store, the CurrentApp object won’t work in the app. Use the CurrentAppSimulator to test your app’s licensing and in-app purchases while you develop your app. After you test your app and before you submit it to the Microsoft Store, replace the instances of CurrentAppSimulator with CurrentApp. Your app will fail certification if it uses CurrentAppSimulator.

Note

When using the simulation, the initial licensing state of the app is described in WindowsStoreProxy.xml. CurrentAppSimulator method that alter the license state, for example by buying a license or handling an in-app purchase, only update the license state of the object in memory. The contents of WindowsStoreProxy.xml are not changed. When the app starts again, the license state reverts to what is described in WindowsStoreProxy.xml.

The CurrentAppSimulator object gets its data from the WindowsStoreProxy.xml file. You must configure this file for the scenario that you want to simulate in the CurrentAppSimulator properties.

The contents of this file are defined by the SimulatedCurrentApp.xsd file included as an example later in this topic, and they reflect the organization of the objects and properties of the Windows.ApplicationModel.Store namespace.

The elements of this file are included in the CurrentApp root node and include:

Requirements

Namespace: Windows.ApplicationModel.Store

Metadata: windows.winmd

See also

Reference

CurrentAppSimulator Members

Windows.ApplicationModel.Store Namespace