I have a UITableView set up with different in app purchases. Each option takes you to a view controller which also has the delegate and what not to do the in app purchases. A plist file is change to determine which option in the table view was selected. This all works fine. I put in NSLogs to make sure the variable was getting set. However when i click buy, it only works half the time and the other half i get
EXC_BAD_ACCESS
on the line:
[[SKPaymentQueue defaultQueue] addPayment:payment];
Everything is set up right as far as the in app purchases go because it used to work before i switched to this way of doing it. I think it may have something to do with calling the productsRequest because i set up NSLog in the didReceiveResponse delegate and it receive the response much quicker after the first time. Im stuck. The ones that dont work are always random, no rhyme or reason. Any help is appreciated.
Look up NSZombieEnabled it will make anything that gets deallocated into an object that will log a message when and who called it. This is quite useful for tracking down these types of EXC_BAD_ACCESS issues.