问题描述
我有一个现有的iOS应用,其中包含应用内购买.我已经完成了将其移植到macoS的以下操作,
I have an existing iOS app that contains in-app purchases. I've done the following to port it to macoS,
- 通过添加Mac作为目标在Xcode中内置.
- 将macOS平台添加到App Store Connect上的现有应用程序.我尚未上传macOS版本.
- 完全退出App Store.
- 在Finder中运行应用.我还测试了如何从命令行运行,以查看是否弹出任何控制台消息.
您可以想象,我创建了一个SKProductsRequest对象并调用start().iOS版本恢复正常,而macOS版本不返回任何内容(或者至少不通过productsRequest返回SKProductsResponse).
As you can imagine, I create an SKProductsRequest object and call start(). Whereas the iOS version comes back fine, the macOS version does not return anything (or at least it's not returning a SKProductsResponse through productsRequest).
我希望App Store Connect或我的构建中有一些较小的设置,但我缺少.
I am hoping there's some minor setting in App Store Connect or in my build that I'm missing.
谢谢.
推荐答案
我遇到了同样的问题.我必须为我的 SKProductsRequest
添加一个强有力的参考,以使其在为Mac构建/测试时返回.对于iOS,它从来不需要强大的参考来工作.
I had this same issue. I had to add a strong reference to my SKProductsRequest
for it to return when building/testing for Mac. For iOS, it didn't ever need the strong reference to work.
这篇关于在Catalyst应用中SKProductsRequest不返回SKProductsResponse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!