SKPaymentQueue addTransactionObserver要求在启动应用程序商店的密码应用程序内购买后 [英] SKPaymentQueue addTransactionObserver asking for App Store password on startup after in-app purchase

查看:2451
本文介绍了SKPaymentQueue addTransactionObserver要求在启动应用程序商店的密码应用程序内购买后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序正在使用应用内购买,而大多数我的用户可以购买就好了,没有任何问题。对于这些人来说,购买成功,他们很高兴我后,应用程序下载的内容。

不过,对于越来越多的我的用户,一旦他们完成一个成功的应用程序内购买他们正在每一个应用程序后启动时询问他们的App Store密码。我相信这是在调用发生的事情:

[SKPaymentQueue defaultQueue] addTransactionObserver:观察];

而我在启动时调用(按照苹果的应用内购买指南步骤6:<一href=\"http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.html\">http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.html).

我的猜测是,由于某些原因,苹果的应用程序内购买服务器不注册该交易成功完成 - 尽管我称之为

[SKPaymentQueue defaultQueue] finishTransaction:交易];

当交易完成后,我的内容已成功下载。

2的问题:


  1. 是其他人看到这一点?


  2. 有没有人有一个修复建议?


在此先感谢您的帮助!

BOUNTY修改

其它用不同的苹果ID做了一个交易。这就是为什么,除非你在正确的凭据到对话框中键入它不能完成。这个问题应该是:


  1. 如何prevent这种死亡的事务(交易还没有过完,用户没有网络,同时改变的App-ID)?

  2. 您如何修剪 SkPaymentQueue


解决方案

我有同样的problem.make确信你调用

  [SKPaymentQueue defaultQueue] finishTransaction:交易]

有关交易的所有三种状态:SKPaymentTransactionStatePurchased,SKPaymentTransactionStateRestored,SKPaymentTransactionStateFailed

My app is using in-app purchases, and most of my users can purchase just fine without any problems. For these folks, my app downloads the content after the purchase succeeds and they are happy.

However, for a growing number of my users, once they complete a successful in-app purchase they are being asked for their App Store password every time the app starts up after that. I believe this is happening on the call to:

[[SKPaymentQueue defaultQueue] addTransactionObserver:observer];

which I am calling on startup (in accordance with step 6 in Apple's in-app purchase guide: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.html).

My guess is that, for some reason, Apple's in-app purchase servers aren't registering that the transaction finished successfully - even though I call

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];

when the transaction is completed and my content has been successfully downloaded.

2 questions:

  1. Is anyone else seeing this?

  2. Does anyone have a suggested fix?

Thanks in advance for your help!

BOUNTY EDIT:

Its a transaction which was made with a different Apple-ID. Thats why it cannot be finished unless you type in the right credentials into the dialog. The Question should be either:

  1. How can I prevent such dead transactions (transaction has not been finished, user has no network, meanwhile changes App-ID)?
  2. How can you prune the SkPaymentQueue?

解决方案

I had the same problem.make sure that you call

[[SKPaymentQueue defaultQueue] finishTransaction:transaction]; 

for all three states of the transactions: SKPaymentTransactionStatePurchased, SKPaymentTransactionStateRestored, SKPaymentTransactionStateFailed.

这篇关于SKPaymentQueue addTransactionObserver要求在启动应用程序商店的密码应用程序内购买后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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