objective c - app crashes first time only not in second time in app purchase ios -
my app crashes first time when buying in app purchase when app run second time not crashing. getting:
exc_bad_access(code=1, address=0x11f3)
i have searched not getting solution this. have used following dealloc method :-
-(void)dealloc { sharedinstance.productsrequest.delegate = nil; sharedinstance.productsrequest = nil; [[skpaymentqueue defaultqueue] removetransactionobserver:sharedinstance]; }
my code getting crash :-
-(void)purchaseitem:(skproduct *)product { nslog(@";buying %@...", product.productidentifier); if (product == nil) { [self noproductsfound]; } else { skpayment *payment = [skpayment paymentwithproduct:product]; [[skpaymentqueue defaultqueue] addpayment:payment];// here getting crash warning... } }
thanks in advance .
Comments
Post a Comment