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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -