2

I need to implement InApp Purchase in my monotouch app, but I cannot find any project sample on the Xamarin website ( http://samples.xamarin.com/iOS ) or in the monotouch samples collection on GitHub ( https://github.com/xamarin/monotouch-samples ).

Any help is appeciated, Thanks.

Emanuele Sabetta
  • 1,571
  • 12
  • 34

2 Answers2

6

I'm working on a MonoTouch In-App Purchase sample, you can check out the code here:

https://github.com/conceptdev/xamarin-samples/tree/master/InAppPurchase

The sample contains two projects, one that demonstrates Consumable purchases and one that demonstrates NonConsumable purchases.

NOTE: the example does not yet demonstrate RECEIPT VERIFICATION, so you'll have to add this in yourself (why? see hack, fix). Check out @redth's server-side code to help build your own receipt verification logic with ASP.NET: https://github.com/Redth/APNS-Sharp/tree/master/JdSoft.Apple.AppStore

You might also consider this services like UrbanAirship or Beeblex (although I have not tried them, so can't) for receipt verification.

FYI my sample code is based in-part on @jtclancey's AppStore code here: https://github.com/Clancey/ClanceyLib

Finally, there's a bit of set-up required for In-App Purchases (registering your bank details with Apple, setting up the products in the iOS Developer Portal, Provisioning your app correctly). These steps are the same for MonoTouch and Objective-C, so this Apple setup doco might help. You should also read Apple's In-App Purchase programming docs, for familiarity.

Conceptdev
  • 3,261
  • 1
  • 21
  • 23
0

Don't know what do you mean by "monotouch" but I implemented In-App purchased in my iPad project using this tutorial. This is the best out there. Just go through it, download sample and you'll get what you need for a simple yet awesome In-App feature in your project.

http://www.raywenderlich.com/2797/introduction-to-in-app-purchases

SHA
  • 15
  • 2
  • 6
  • 2
    I mean sample projects that use the MonoTouch framework ( http://xamarin.com/monotouch/ ), that allows iOS apps to be written in C#. The example you linked is not written in C# but in Objective-C. I need a C# example project showing how to make In App Purchases. – Emanuele Sabetta Jul 20 '12 at 13:15