views:

55

answers:

2

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?

A: 

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.

Brian
Am very pleased it is not just me!
Roger
A: 

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.

Ken Anderson