Skip to main content
FramaisCellarGhost
Known Participant
October 8, 2013
Answered

iOS In App Purchases restore transactions not working properly with Milkman Games ANE for Adobe AIR

  • October 8, 2013
  • 2 replies
  • 4542 views

I am experiencing the following problems with Milkman Games in-app-purchases ANE dor Adobe AIR:

PROBLEM 1

0) StoreKit is created and correctly returns all the product IDs via StoreKit.storeKit.loadProductDetails()

1) I purchase item A, the item is correctly purchased

2) I purchase item B, the item is correctly purchased

3) I uninstall and re-install the app

4) I restore transactions via StoreKit.storeKit.restoreTransactions()

5) Only item B is restored ( onPurchaseSuccess() is only triggered once for item B)

EXPECTED BEHAVIOUR: I would expect that restoreTransactions() would trigger onPurchaseSuccess() for each of the items previously restored.

PROBLEM 2

6) I close the app

7) When I restart the app, onPurchaseSuccess() for product B is fired without any of the app code calling it.

Is StoreKit attempting to restore transactions by default everytime StoreKit is created? (i.e. StoreKit.create(); )

Testing device: iPad2, iPhone4

Operating System: iOS 7 and iOS 6

Compiling for: AIR 3.8

Type of item purchased: all items tested are non-consumable

Did anyone ever experienced such a behaviour with iOS in-app-purchases in an AIR mobile app? Any ideas or pointer in the right direction are appreciated, thanks!

This topic has been closed for replies.
Correct answer Colin Holgate

I see that today there was an update to the ANE to solve a problem seen by some users doing a Restore. Can’t do any harm to get that update!

2 replies

MJD1981
Inspiring
October 12, 2013

One problem I'm having is that onPurchaseSuccess() is no longer doing all I ask it to do since I updated the ANE and migrated to AIR 3.9. Specifically, it no longers stores the purchase in my SharedObject.

I'm trying to diagnose whether it's AIR 3.9, iOS7, the ANE, or my implementation?!

Colin Holgate
Inspiring
October 12, 2013

I didn’t follow their example code, I just do my own thing with sharedobjects, and I think it’s still working with the new version.

What does your code look like?

Inspiring
October 8, 2013

I am using this ANE too for 2 apps on the Apple Appstore and they all seem to work just fine. One has multiple in apps and when I restore one, it restores them all ( all the purchased ones ).

Colin Holgate
Colin HolgateCorrect answer
Inspiring
October 9, 2013

I see that today there was an update to the ANE to solve a problem seen by some users doing a Restore. Can’t do any harm to get that update!

FramaisCellarGhost
Known Participant
October 9, 2013

Yes, that was it, the latest update (2.0.1) fixed my problem!

The bruises on my forehead for banging my head in the monitor for a whole day should be gone soon too