I had a bug in my code that caused a crash in ProcessPurchase before I could return PurchaseProcessingResult.Complete
Now every time after OnIniitialized is called the app crashes and an iOS window pops up to confirm pending purchases in the sandbox and I can’t get past the issue because the transaction remains in my payment Queue. All my research suggests that I should just restore my phone or remove it from the iOS store queue, but, I don’t want to do that because I assume that this can occur if a user switched apps or killed the process or wifi disconnected and an end user could get into this state.
How do I resolve the current issue - this is my biggest issue
The pending purchase should be automatically recovered by IAP, the fact that it isn’t doing that requires more investigation. Could you post the stack trace of the crash and the debug logs that run from app start to the crash (and any other relevant parts, pretty much as much debug logs as you can) for us to look at?
Unfortunately I don’t have the stack and it is no longer crashing. Thing to remember is that this was the ios sandbox, I made an attempt to consume the pending messages by adding ConfirmPendingPurchase which seems to have worked. I then removed the code and all is well.
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args)
{
//Removed this code after the pending messages stopped,
// not sure if this code consumed the pending or there was some type of timeout on the pending messages
//ConfirmPendingPurchase(args.purchasedProduct);
Using standard demo code here …
Crashed before completing purchase which started my troubles, the crash has since been fixed.