I just released version 2 of open source project InAppPurchaseToggle.
I’ve updated the original post to document the new features:
SHARE:
I just released version 2 of a new open source project called InAppPurchaseToggle.
It simplifies querying if the current user has paid for a particular in-app-purchase (IAP).
It’s convention based and allows creation of strongly-typed objects to represent each IAP offer that you’ve configured in the win8 dev dashboard for your app.
How To Use (updated for v2.0.0)
Create a new Windows Store app project (C#/XAML)in Visual Studio.
Install the NuGet package InAppPurchaseToggle.
Currently the package just installs the source in a folder called “InAppPurchaseToggleCode”, this is to simply multi platform (ARM, x86, x64) until NuGet is able to provide dll versions for different platforms.
Single In App Offer
Assuming you had set up an in app offer in the developer dashboard for your app called “AwesomeFeature1” you would create the following class:
internal class AwesomeFeature1 : InAppPurchaseToggle.SinglePurchaseToggleBase {}
There’s no need to implement anything else. Note: the name of the class exactly matches the name of the offer that was created in the developer dashboard.
More...
SHARE: