iPhone: Since when did SKPaymentQueue addPayment trigger the applicationWillResignActive callback?

徘徊边缘 提交于 2019-12-23 05:25:59

问题


Did I miss this information in the documentation? Am I going mad?? I'm debugging some payment issues and have just discovered that the following code is triggering our applicationWillResignActive callback in the app delegate.

SKPayment *payment = [SKPayment paymentWithProductIdentifier:productid]; 
[[SKPaymentQueue defaultQueue] addPayment:payment];

This is happening on ioS3 which makes me think this has always been the behaviour, but we probably haven't noticed because we didn't implement the applicationWillResignActive callback before ...

Is this really what the iTunes storekit is meant to do? I can't find an official reference to this anywhere?


回答1:


Indeed, I see nothing in the docs about the app resigning when a payment is added, but I can confirm that it happens for me as well. I don't actually implement applicationWillResignActive: or applicationDidBecomeActive:, but I tossed them in just to see if they get triggered, and sure enough, they do.




回答2:


Sure you're resigning active, since the store has taken over to verify the payment with the user. It's the same as a phone call or SMS arriving.



来源:https://stackoverflow.com/questions/3891082/iphone-since-when-did-skpaymentqueue-addpayment-trigger-the-applicationwillresi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!