react-native-in-app-utils icon indicating copy to clipboard operation
react-native-in-app-utils copied to clipboard

Retain productsRequest

Open tarkus opened this issue 9 years ago • 3 comments
trafficstars

On tvOS, productsRequest got released at end of the loadProducts func, and the following callbacks won't be fired. Declare it as a class level variable fix the problem.

tarkus avatar Oct 06 '16 15:10 tarkus

are you sure this is a problem only for loadProducts? my guess is it could happen for purchaseProduct. Not sure if this is the right fix.

chirag04 avatar Oct 06 '16 15:10 chirag04

It could happen for purchaseProduct on tvOS, but without this fix, loadProducts will silently fail with no response, so we don't have a chance to know what happen next.

PS: this fix is for tvOS specifically, iOS just don't need it.

tarkus avatar Oct 07 '16 06:10 tarkus

Credit goes to Will http://stackoverflow.com/questions/33842304/swift-tvos-in-app-purchase-doesnt-respond

tarkus avatar Oct 07 '16 06:10 tarkus