libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

Implementation of the iOS AppStore purchase manager #10

Closed BlueRiverInteractive closed 9 years ago

BlueRiverInteractive commented 9 years ago

This PR adds an implementation for the iOS Apple AppStore purchase manager.

It still needs to be thoroughly tested, especially purchasing and SKPaymentTransaction to Transaction conversion.

On iOS 7+ it's necessary to start a SKReceiptRefreshRequest to get a receipt for verification. Perhaps we could add a StoreParameter for enabling this receipt fetching. The receipt fetching would then be done (if necessary) everytime before a transaction is finished.

Currently I'm using the latest nightly version of robovm because there were big changes between alpha-04 and the current version. We should change this once a new stable is out.

noblemaster commented 9 years ago

Looks good! :)

re-receipt fetching: I think that should be added by default if an app is running on iOS 7+ given the old way appears deprecated!?

re-restores: please note that PayTest.java isn't implemented in a very good way (my bad!). We should actually slap a GUI over it that has a [Restore] and [Purchase] button rather than doing it via Timer. The restore-function should only be called if a user presses the restore button in the app. That's required on iOS for example given that calling the function will popup a login screen.