How to make in app purchase work with tvOS beta 2?

ぃ、小莉子 提交于 2019-12-10 16:37:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!