Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In App Purchase Crash - [[SKPaymentQueue defaultQueue] addPayment:payment];

I am getting a crash with the following error message:

[FilterPurchase respondsToSelector:]: message sent to deallocated instance 0x1edacba0

This occurs on this line:

 [[SKPaymentQueue defaultQueue] addPayment:payment];

The problem occurs when I load the In App Purchase View, then remove the view from superview and then re-open it and click to make a purchase.

Has anyone got any ideas on how I could correct this issue. Don't know if the above is enough information to correct the issue.

Don't know if this has anything to do with it but it is called on each load.

[[SKPaymentQueue defaultQueue] addTransactionObserver:self];

Thanks

like image 616
ORStudios Avatar asked Dec 06 '25 13:12

ORStudios


1 Answers

The problem I think is fixed. Just before the back button to close the modal is pressed I call.

 [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
like image 192
ORStudios Avatar answered Dec 08 '25 18:12

ORStudios



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!