BlueRiverInteractive / robovm-ios-bindings

[Deprecated] New bindings: https://github.com/robovm/robovm-robopods. A collection of third party bindings for RoboVM iOS
Apache License 2.0
162 stars 101 forks source link

in-app purchases IOS #186

Open AceEX7 opened 8 years ago

AceEX7 commented 8 years ago

apple would not accept my app since the in app puchase does not work for some devices. during my tests the in app purchase worked but on some devices the in app purchase dialog won't even pop up. the devices on which the IAP does not work according to apple are: Ipad Air 2 and Iphone 6 running on iOS 9.0.2.. i checked my app on an iphone 6 with iOS 8.4 and it doesn't work there as well.

any solutions, suggestions on how to resolve this issue?

BlueRiverInteractive commented 8 years ago

Hi, can you show some code? Could it be that there is threading involved? The IAP stuff should always be called on the main thread (NSOperationQueue.getMainQueue().addOperation(...)). Even if you call these things on the LibGDX render thread, it may not always work :)

AceEX7 commented 8 years ago

thanks for the quick respone! i'm using the following method to make an IAP from the IOSLauncher Class

public void purchaseProduct(String product) { if(iapManager.canMakePayments() && appStoreProducts!=null) { iapManager.purchaseProduct(appStoreProducts.get(product)); } }

how can i insert this code into the main thread?

thanks!