简体   繁体   English

将 iOS 应用程序发布到 App Store 后,应用程序内购买不起作用

[英]In app purchase not working after publishing iOS app to App Store

During development I've created test accounts which are able to obtain the price of the in app purchase as well as actually purchasing it without an issue.在开发过程中,我创建了测试账户,这些账户能够获得应用内购买的价格,并且可以毫无问题地实际购买。 However after publishing the iOS app to App Store, the version of the app in App store can't even retrieve price of the product, and nothing shows up when I press the button to send the purchase request.但是将iOS应用发布到App Store后,应用商店中的应用版本甚至无法检索产品价格,当我按下按钮发送购买请求时什么也没有显示。

Uninstalling the app and redeploy the development version to the same device got it to work again.卸载该应用程序并将开发版本重新部署到同一设备使其再次工作。

What could be the problem?可能是什么问题呢? Is there a way to debug or see logs on the app store downloaded version?有没有办法调试或查看应用商店下载版本的日志? (iOS noob here) (这里是 iOS 菜鸟)

Thanks!谢谢!

I had the same problem.我有同样的问题。 The app was approved but in-app purchases were not working.该应用程序已获得批准,但应用程序内购买无效。 After 24-48 of app publishing problem was fixed by its own. 24-48后app发布问题自行修复。 By the time app approved it was not appearing on App Store through search.到应用程序批准时,它还没有通过搜索出现在 App Store 上。 After it was indexed on App Store in-apps started to work also.在 App Store 上被索引后,应用内也开始工作。

It takes a little time even when everything is approved.即使一切都通过了,也需要一点时间。

  • My binary was approved.我的二进制文件被批准了。
  • My In-App Purchase (IAP) was approved.我的应用内购买 (IAP) 已获批准。
  • Testing the purchase in development with a sandbox iTunes Account worked great.使用沙盒 iTunes 帐户测试开发中的购买效果非常好。
  • Purchasing in production with a real or sandbox iTunes Account would fail.使用真实沙盒 iTunes 帐户在生产环境中购买会失败。

I didn't have to wait long, something like a couple hours and it just started working.我不必等待很长时间,大约几个小时,它就开始工作了。

Now, my binary and my In-App Purhcase were approved at the same time and almost immediately after they were both approved, I released the app version to the store.现在,我的二进制文件和我的 In-App Purhcase 同时获得批准,几乎在它们都获得批准后,我立即将应用程序版本发布到商店。

I'm not positive, but what I probably should have done was wait a couple hours before releasing that new app version and give the In-App Purchase a chance to "register" or "propagate" in the Production App Store.我不是很肯定,但我可能应该做的是在发布新应用版本之前等待几个小时,并让应用内购买有机会在生产应用商店中“注册”或“传播”。

Just a recommendation for others.只是给别人的建议。

It takes some time, but the amount isn't predictable.这需要一些时间,但数量是不可预测的。 In my case, I launched 3 very similar apps at the same time , so just add some data on this :就我而言,我同时启动了 3 个非常相似的应用程序,所以只需添加一些数据:

  • Everything was approved, the apps were quickly available on the App Store.一切都得到了批准,这些应用程序很快就可以在 App Store 上使用。
  • It took about 4 hours for 2 of the apps to show up in search results.其中 2 个应用程序花了大约 4 个小时才出现在搜索结果中。
  • After 6 hours, IAPs started progressively showing up (not all at once) for these 6 小时后,IAP 开始逐渐出现(不是一次全部出现)
  • After 9 hours, IAPs for the two apps were complete. 9 小时后,两个应用的 IAP 完成。
  • After 12 hours, IAPs for the last app started appearing, but the last app itself still wasn't showing up in search results. 12 小时后,最后一个应用的 IAP 开始出现,但最后一个应用本身仍未出现在搜索结果中。
  • After 14 hours, the last app appeared in search results. 14 小时后,最后一个应用出现在搜索结果中。

The order in which I hit the "Publish" button didn't seem to have any influence, nor the number of IAPs, weight of the app, etc. So delays are unpredictable and do not follow a specific rule ("First-in, first-out" or "search results and then IAP")我点击“发布”按钮的顺序似乎没有任何影响,IAP 的数量、应用程序的权重等也没有影响。因此延迟是不可预测的,并且不遵循特定规则(“First-in,先出”或“先搜索结果再 IAP”)

I found this Apple Tech note , which is includes follow:我找到了这个 Apple 技术说明,其中包括以下内容:

Q. App Review has recently approved my application, but my In-App Purchase identifiers in the production version of the application are being returned in the invalidProductIdentifiers array.问:App Review 最近批准了我的申请,但我在应用程序生产版本中的应用内购买标识符在 invalidProductIdentifiers 数组中返回。

A. When an application is approved, the developer must also approve the application for release to the App Store. A. 应用程序获得批准后,开发者还必须批准该应用程序才能发布到 App Store。 On approval, the application ID is activated to the App Store.批准后,应用程序 ID 将被激活到 App Store。 The same activation is required for the in-app purchase identifiers and can only take place once the application is activated.应用内购买标识符需要相同的激活,并且只能在应用激活后进行。 In some cases, the activation of the In-App Purchase identifiers may lag up to 48 hours following the activation of the application.在某些情况下,应用程序内购买标识符的激活可能会在应用程序激活后最多延迟 48 小时。

If the developer does not approve the release of the production application to the App Store, then any new in-app purchase identifiers will not be activated.如果开发人员不批准将生产应用程序发布到 App Store,则不会激活任何新的应用内购买标识符。 This is an issue when a developer wants to verify the application prior to activating it on the App Store.当开发人员想要在 App Store 上激活应用程序之前验证应用程序时,这是一个问题。 If the desire is to test the in-app purchase process for the new items, the application must be activated to the App Store.如果希望测试新项目的应用内购买过程,则必须将应用程序激活到 App Store。 This is only an issue for new in-app purchase identifiers in a corresponding application submission.这只是相应应用程序提交中新的应用内购买标识符的问题。 Once these in-app purchase identifiers have been activated, application updates to the submission will find that these in-app purchase identifiers are validated, even if the update is not activated.一旦这些应用内购买标识符被激活,提交的应用程序更新将发现这些应用内购买标识符已被验证,即使更新未激活。


But in my case it takes even further, about 52 hours.但就我而言,它需要更长时间,大约 52 小时。

I found that doing a simple edit of the description in each IAP helps.我发现对每个 IAP 中的描述进行简单的编辑会有所帮助。 Just make an edit, save it, revert to the original and save again.只需进行编辑,保存,恢复为原始文件并再次保存。 It took up to 8 hours for it to propagate across Apple servers.它在 Apple 服务器上传播最多需要 8 个小时。 IAP's I didn't do this to had no change. IAP 我没有这样做是为了没有变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM