react-native-in-app-utils
react-native-in-app-utils copied to clipboard
Retain productsRequest
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.
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.
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.
Credit goes to Will http://stackoverflow.com/questions/33842304/swift-tvos-in-app-purchase-doesnt-respond