libgdx / gdx-pay

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

iOS: SKPayment create() is protected -> Constructor made public #63

Closed maximiliancsuk closed 8 years ago

maximiliancsuk commented 8 years ago

Hey,

it seems like starting with RoboVM 1.8, the SKPayment class has changed. SKPayment.create() is made protected, which I think is why PurchaseManageriOSApple produces a NoSuchMethodError exception when running the purchase() method: java.lang.NoSuchMethodError: org.robovm.apple.storekit.SKPayment.create(Lorg/robovm/apple/storekit/SKProduct;)Lorg/robovm/apple/storekit/SKPayment; at com.badlogic.gdx.pay.ios.apple.PurchaseManageriOSApple.purchase(PurchaseManageriOSApple.java) at com.badlogic.gdx.pay.PurchaseSystem.purchase(PurchaseSystem.java)

I'd say we are required to call the constructor for SKPayment instead.

EDIT: OK, I see now that this is already fixed in 0.6.0-SNAPSHOT. Sorry, and thanks for making this project! :)

noblemaster commented 8 years ago

alex-dorokhov provided the fixes just yesterday :-D

alex-dorokhov commented 8 years ago

no-no, that was xoppa :)

noblemaster commented 8 years ago

My bad: although it seems it was both xoppa & you! Thanks to both you guys :-D

LombrozoV commented 8 years ago

Hello. I have this problem also. Can i download new version gdx-pay with use of gradle? Last version (0.5.0) in the Maven Central updated 13-Aug-2015.

alex-dorokhov commented 8 years ago

As it is written in description here: https://github.com/libgdx/gdx-pay, snapshot versions are available via sonatype. So, add this repository in gradle script:

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

and then use gdx-pay 0.6.0-SNAPSHOT

LombrozoV commented 8 years ago

Thank you. It works