Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8516899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:33:15+00:00 2026-06-11T05:33:15+00:00

I’ve now been trying for two days to implement in app purchase in an

  • 0

I’ve now been trying for two days to implement in app purchase in an iOS app, with the same error bugging me.

I get an EXC_BAC_ACCESS error every time I try to start my SKProductsRequest object.

I’ve read dozens of people having me same error, but none of the solutions seems to work for me.

When I set NSZombieEnabled, i get following error:

[AppShopper respondsToSelector:]: message sent to deallocated instance 0x1d9340

Here’s my AppShopper.h:

#import <StoreKit/StoreKit.h>

#define kInAppPurchaseManagerProductsFetchedNotification @"kInAppPurchaseManagerProductsFetchedNotification"


@interface AppShopper : NSObject <SKProductsRequestDelegate>

@property (nonatomic, strong) SKProduct *product;
@property (nonatomic, strong) SKProductsRequest *request;

- (void) requestProductData;

@end

And my AppShopper.m:

#import "AppShopper.h"

@implementation AppShopper

#define productId @"XXX.ProductID.XXX"

@synthesize request = _request;
@synthesize product = _product;

- (void) request:(SKRequest *)request didFailWithError:(NSError *)error{
    printf("Error!\n");
    _request = nil;
    _product = nil;
}

- (void) requestDidFinish:(SKRequest *)request {
    printf("Finished request!\n");
}

- (void) requestProductData{
    printf("requestProductData\n");

    NSSet *productIdentifiers = [NSSet setWithObject:productId];

    self.request = [[SKProductsRequest alloc] initWithProductIdentifiers: productIdentifiers];

    self.request.delegate = self;
    [self.request start];

    printf("requestProductData End\n");
}

#pragma mark -
#pragma mark SKProductsRequestDelegate methods

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    printf("productsRequest\n");
    NSArray *products = response.products;

    self.product = [products count] == 1 ? [products objectAtIndex:0] : nil;
    if (self.product)
    {
        NSLog(@"Product title: %@" , self.product.localizedTitle);
        NSLog(@"Product description: %@" , self.product.localizedDescription);
        NSLog(@"Product price: %@" , self.product.price);
        NSLog(@"Product id: %@" , self.product.productIdentifier);
    }

    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Invalid product id: %@" , invalidProductId);
    }

    _request = nil;
    _product = nil;

    [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil];
}


@end

I try to start the in app purchase with the following code:

AppShopper *shopper = [[AppShopper alloc] init];
[shopper requestProductData];

My output is only:

requestProductData
requestProductData End

2012-09-10 19:43:30.210 MyApp[4327:707] *** -[AppShopper respondsToSelector:]: message sent to deallocated instance 0x1d9340

And, yes I am:

  1. testing on a physical device
  2. in sandbox environment with test user
  3. with a proper provisioning profile

Any help appreciated, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:33:16+00:00Added an answer on June 11, 2026 at 5:33 am

    The bug will be in whichever object makes your AppShopper.

    For example,

    AppShopper *shopper = [AppShopper new];
    ... setup shopper here ...
    [shopper requestProductData];
    

    How does ARC know that you want to keep your AppShopper around? It doesn’t and it will release it immediately after requestProductData. Then, when the request returns it will try to call it’s delegate methods, which won’t exist anymore.

    Try storing your AppShopper as a strong property instead of a local variable and see if that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.