Game Development Reference
In-Depth Information
which will give you a StorageFolder representing the root of your installation dir-
ectory. Once you have that, just retrieve your XML file and use it in the following
block of code:
concurrency::task<void>
reloadTask(CurrentAppSimulator::ReloadSimulatorAsync(xmlFile));
reloadTask.wait();
Now that the file has been loaded in, you can interact with the simulator as if it were
a CurrentApp ; however, when a purchase is requested, a debug dialog will appear,
allowing you to select which response the store should provide. This would be where
you test how your app works if a purchase fails or succeeds.
The XML file has a simple format, with a CurrentApp node for the root, and then
two child nodes, as follows:
• The ListingInformation node
• The LicenseInformation node
You can find a sample simulator file and full reference at
http://msdn.microsoft.com/en-us/library/windows/apps/win-
dows.applicationmodel.store.currentappsimulator.aspx .
Let's take a look at the ListingInformation node, which defines the same data
that you would specify in the store dashboard:
<?xml version="1.0" encoding="utf-16" ?>
<CurrentApp>
<ListingInformation />
<LicenseInformation />
</CurrentApp>
There are two different items that can appear inside the ListingInformation
section: the App , and one or more Product nodes. As you would expect, the App
node describes the details about the app, such as the App ID, Store Link, Age Rat-
ing, and Price for the simulator market (which is also defined here). The Product
Search WWH ::




Custom Search