我已在 iTunes Connect 中通过应用内购买设置了我的应用程序。已经 24 小时了,我仍然从 SKProductsRequest 收到零产品。
我想知道我使用的配置文件是否有问题。我创建了一个新的应用程序 ID,并使用该应用程序 ID 创建了使用相同应用程序 ID 的开发和分发配置文件。我使用分发配置文件构建了应用程序并将其上传到应用程序商店。
现在我正在使用开发配置文件来测试应用程序 - 这是我想知道我是否犯了错误的地方。我不应该在这里使用开发配置文件吗?我应该使用 Ad Hoc 发行版吗?
I have setup my app in iTunes Connect, with an In App Purchase. It has been 24 hours and I am still getting zero products back from SKProductsRequest.
I am wondering if there is a problem with which provisioning profile I am using. I created a new App ID and used that App ID to create a Development and Distribution Profile using the same App ID. I built the app with the Distribution profile and uploaded it to the app store.
Now I am using the Development profile to test the app - this is where I am wondering if I am making a mistake. Should I not be using the Development profile here? Should I use an Ad Hoc distribution?
发布评论
评论(2)
最大的问题是应用内购买的界面似乎发生了很大变化。以下是 2010 年 11 月 1 日对我有用的步骤:
我这样做了,它立即生效 - 尽管您可能需要等待您的应用内购买产品通过苹果系统传播。
尖端:
我使用了本教程中的代码:
http://troybrant.net/blog/2010/ 01/in-app-purchases-a-full-walkthrough/
确保您的应用 ID 是应用内购买产品 ID 的基础
如果您的App ID是com.website.app
您的应用内购买产品的 ID 应为 com.website.app.productname
确保您的 .plist 文件中有 AppID
此页面上的清单很有帮助,但有点过时。 http://troybrant.net/blog/2010/01/invalid-product- ids/
这是更新后的清单:
您是否已检查过您的产品的“Cleared for Sale”?
您项目的 .plist Bundle ID 与您的 App ID 匹配吗?
您是否为新的应用程序 ID 生成并安装了新的开发配置文件?
您是否已将您的项目配置为使用此新的开发配置文件进行代码签名?
您正在为 iPhone OS 3.0 或更高版本进行构建吗?
您在发出 SKProductRequest 时是否使用完整的产品 ID?
自从将产品添加到 iTunes Connect 后,您是否已经等待了几个小时?
您的银行详细信息在 iTunes Connect 上有效吗? (通过马克)
The big problem is that the interface for In App Purchases seems to change a lot. Here are the steps that worked for me on November 1, 2010:
I did this and it worked instantly - though you may need to wait for your In App Purchase Product to propogate through Apple's system.
Tips:
I used the code found in this tuorial:
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/
Make sure your App ID is the base for your In App Purchase Product's ID
If your App ID is com.website.app
Your In App Purchase Product's ID should be com.website.app.productname
Make sure you have the AppID in your .plist file
The checklist on this page is helpful, though a bit outdated. http://troybrant.net/blog/2010/01/invalid-product-ids/
Here is an updated checklist:
Have you checked Cleared for Sale for your product?
Does your project’s .plist Bundle ID match your App ID?
Have you generated and installed a new Development Provisioning Profile for the new App ID?
Have you configured your project to code sign using this new Development Provisioning Profile ?
Are you building for iPhone OS 3.0 or above?
Are you using the full Product ID when when making an SKProductRequest?
Have you waited several hours since adding your product to iTunes Connect?
Are your bank details active on iTunes Connect? (via Mark)
首先,您必须在实际设备上运行您的程序。 StoreKit API 无法在模拟器上运行。
在你撕扯你的头发之前,请阅读这两页。他们对我的应用内购买工作都非常有帮助。第二个链接是使用 StoreKit API 获取结果所需的直接清单。
http://troybrant.net/blog/2010/ 01/in-app-purchases-a-full-walkthrough/
http://troybrant.net/blog/2010/01/invalid-product-ids/
First off, you must run your program on an actual device. The StoreKit API will not work on the simulator.
Before you tear your hair out, read these two pages. They were both EXTREMELY helpful to me in getting In-App Purchasing working. The second link is a straight checklist of things you need to get results back using the StoreKit API.
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/
http://troybrant.net/blog/2010/01/invalid-product-ids/