[For full details on working with the Windows Store, see Chapter 20 of my free ebook Programming Windows Store Apps with HTML, CSS, and JavaScript.]


Q. I want to have my app load and show in-app purchase listings, but until the app is in the Store, such listing information won't be available. As a result, my app will look non-functional and could fail certification. What can I do about that?

A. The right approach is to remember that Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync is not ever guaranteed to work. Having no listing information in the Store is one case where it would fail, but so is lacking connectivity. Therefore you should always write your code to fail gracefully is no in-app purchase listings can be obtained. Arik Cohen of the Store team suggests these approaches:

  • Manage your list of in-app purchases in your own service (or have the list built into the app) and use the ListingInformation only for pricing.
  • Don't show the prices within your app
  • Show the purchases as presently unavailable and suggest the user checks back later.

Know too that the unavailability of ListingInformation doesn’t mean that you don’t have in-app purchase information; CurrentApp.LicenseInformation maintains a local cache of all durable in-app purchases that the user has made.

Gracefully handling the case when you're unable to retrieve in-app purchase listing information should avoid any problems in certification.


Q. Is there a way to add or edit in-app purchases to an app that is currently published without having to submit a new build of the app?

A. To change the listing information you always have to submit an update, but you don't have to upload a new app package or change the app's version number. And because you're not changing the package, certification should be quick.

To avoid having to resubmit, you'll need to manage your own in-app purchase catalog, which enables you to generate your list of available purchases dynamically. For more details, see Chapter 20 of (my free ebook) Programming Windows Store Apps with HTML, CSS, and JavaScript, in the section "Handling Large Catalogs" starting on page 1145.

Comments are closed