在Catalyst应用中SKProductsRequest不返回SKProductsResponse [英] SKProductsRequest does not return SKProductsResponse in Catalyst app

查看:119
本文介绍了在Catalyst应用中SKProductsRequest不返回SKProductsResponse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的iOS应用,其中包含应用内购买.我已经完成了将其移植到macoS的以下操作,

I have an existing iOS app that contains in-app purchases. I've done the following to port it to macoS,

  1. 通过添加Mac作为目标在Xcode中内置.
  2. 将macOS平台添加到App Store Connect上的现有应用程序.我尚未上传macOS版本.
  3. 完全退出App Store.
  4. 在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.

这篇文章与Swift中的答案基本相同.

这篇关于在Catalyst应用中SKProductsRequest不返回SKProductsResponse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆