I had just started using MOE for LibGDX iOS application.I have to implement in-app purchasing in iOS for consumable items . As a reference to in-app sample (moe-samples-java/InAppPurchase) in framework/framework-ios module PlatformIAPHelper.java is implementing SKPaymentTransactionObserver Class but I think addTransactionObserver( ) is missing in this sample as it does not triggers the callbacks of transactions ( i.e. PaymentQueueUpdatedTransactions( ) ) but When i add addTransactionObserver( ) it crash on every launch.And if i won’t add this listener then after the first successful transaction it says “This In-App purchase has already been bought. It will be restored for free.”.
what is the right way for in-app purchasing for consumable items ?
Dear Manjul_Kadyan,
we’ve updated our InAppPurchase Sample.
Please refer to this documentation on how to manage purchases: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction.html
Hi, after spending a day trying to fix the same issue I have found workaround.
Magic like of code fixes this:
// Force the Objective-C reference for this instance to be kept.
private NSArray selfReference = NSArray.arrayWithObject(this);
Hope it will help
Thanks ! It really works for me .