Bad access crash app in-app ios

812 views Asked by At

I have a problem with in-app. I have 2 in-apps in my app. But when I bought first and than i wanna buy second my app crash and it show me error Thread 1: EXC_BAD_ACCESS(code=1, address=0x10). On line with [[SKPaymentQueue defaultQueue] addPayment:payment]; Can you help me?

1

There are 1 answers

3
Leandro Fournier On BEST ANSWER

You're providing too little information. Still...

Are you setting payment?

SKPayment *payment = [SKPayment paymentWithProduct:product];

Does product exists and is type SKProduct?

Also you can't create a SKProduct. SKProducts come as a request response. Check your delegate method productsRequest:didReceiveResponse:.

You should debug the whole process by setting breakpoints. Then you will be able to provide more information in case you don't resolve the issue by yourself.