How to check an in-app purchase has already been made in iOS

52 views
Skip to first unread message

TeRaMaNTiS

unread,
May 6, 2014, 3:46:42 PM5/6/14
to codenameone...@googlegroups.com
Hi Guys,

I'm working on application using codenameone that is due on Saturday this week. But I've come up with an issue that is driving me up the walls.

Please please please help is much needed!

I have setup the product in itunes connect and can buy it using the following code:
final Purchase p = Purchase.getInAppPurchase();
p
.purchase(MyApp.getProSku());

Now I want to introduce the functionality of checking if the product has already been bought.

There is a wasPurchased() method in the Purchase library but it is always returning false. So I take it as none functioning.

To manually implement this check, I have tried to use native ios code following the tutorial in this link:

http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial

But it is not working. Does anyone have a solution or hint for how to resolve this? I had a similar issue for Android and was able to resolve it.

But the iOS is just not looking good.

Please I need help guys!

Thanks


Shai Almog

unread,
May 7, 2014, 12:58:25 AM5/7/14
to codenameone...@googlegroups.com, enu...@gmail.com

oopa...@gmail.com

unread,
May 8, 2014, 10:21:14 AM5/8/14
to codenameone...@googlegroups.com, enu...@gmail.com
Thanks Shai,

You answered my question on stackoverflow about using PurchaseCallbacks. I think I will use this method instead of the wasPurchased Which is proving stressful. Thanks
Reply all
Reply to author
Forward
0 new messages