问题
I am working on an tvOS app which is linked (with the same App ID) to an iOS app where in app purchase is fully functional, and I am using the same implementation as for the iOS app.
I am using a development apple TV, not just the simulator.
My sandbox tester account is not recognized by the Apple TV and my productsRequest doesn't get any answer.
Is there something specific to do with StoreKit on tvOS ? Thanks
回答1:
I found the answer. In app purchases actually work with beta 2 and the developer Apple TV.
In my case I just needed to declare my productRequest as a property in my ViewController and not just in my buyProduct()
method like in the iOS version.
var productRequest = SKProductsRequest()
来源:https://stackoverflow.com/questions/32903532/how-to-make-in-app-purchase-work-with-tvos-beta-2