StoreKit In App购买无效的商品标识码 [英] StoreKit In App Purchase invalid product identifiers

查看:168
本文介绍了StoreKit In App购买无效的商品标识码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

iPhone StoreKit - 产品ID无效

我得到了一个来自 SKProductsRequest 的空数组产品标识符。

I am getting an empty array of product identifiers from SKProductsRequest.

我执行了以下步骤:


  1. 在iTunes Connect中的管理用户下创建了一个应用内购买测试用户帐户

  1. Created a In App Purchase Test User account under 'Manage Users' in iTunes Connect

在管理您的应用内购买下创建了一些应用内购买产品。

Created some in app purchase products under 'Manage Your In App Purchases'.

将应用程序加载到iPhone上,转到设置→存储并退出常规商店

Loaded the app onto the iPhone, went to Settings → Store and logged out of the regular store

(void)productsRequest中设置断点:( SKProductsRequest *)请求didReceiveResponse:(SKProductsResponse *)响应回调

所有提交的产品ID都在响应的 invalidProductIdentifiers 属性中。提交请求时,我尝试了在步骤2中创建的产品ID以及前缀为Bundle ID的ID。

All the submitted Product ID's are in the response's invalidProductIdentifiers property. When submitting the request I tried both the Product IDs created during step 2 as well as those IDs prefixed with the Bundle ID.

提前致谢,

Raghu

推荐答案

我尝试了在Apple论坛和这里建议的所有内容,但仍然无法让它工作。找到解决方案 - 您的应用程序需要通过Xcode传输才能启用沙箱。

I tried everything suggested in the Apple forums and here, and still couldn't get it to work. Found the solution - your app needs to be transferred by Xcode for the sandbox to be enabled.

很明显,对吧?好吧,如果您正在使用现有应用程序的更新,设备仍会将其视为App Store安装的应用程序。

Obvious, right? Well, if you are working with an update to an existing application, the device will still treat it as an App Store-installed app.

因此,请从您的设备中删除该应用程序。然后使用Build& amp;将应用程序安装回设备上。将您的设备连接到Mac上运行。它现在应该工作:)

So delete the app from your device. Then install the app back onto the device using Build & Run with your device tethered to your Mac. It should work now :)

这篇关于StoreKit In App购买无效的商品标识码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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