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 6336149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:59:35+00:00 2026-05-24T18:59:35+00:00

My app FourFourTwo Stats Zone has just went live in the App Store this

  • 0

My app FourFourTwo Stats Zone has just went live in the App Store this evening:

I’ve asked a few people to test the In App Purchase and got successes on all devices except the iPhone 3G (running 4.2.1 – haven’t tested with other iOS versions). I’ve tried debugging it on a device I have and it seems that none of the SKProductsRequest delegate methods are being called. Here’s my code:

- (void)requestPurchaseOfCompetition:(Competition*)competition {
    DLog("");

    if ([SKPaymentQueue canMakePayments]) {
        DLog(@"do store");

        NSString* productIdentifier = [NSString stringWithFormat:@"%@%@_%@", kPRODUCT_IDENTIFIER_PREFIX, competition.competitionId, competition.season];

        SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:productIdentifier]];

        [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationRequestProductInfo object:nil userInfo:[NSDictionary dictionaryWithObject:request forKey:@"request"]]];
        request.delegate = self;
        [request start];
        [request release];
    } else {
        DLog(@"no store");

        // Warn the user that purchases are disabled.
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Store", @"Store") message:NSLocalizedString(@"In app purchasing is disabled for this device (in Settings > General > Restrictions).  Please enable this setting to purchase more competitions.", @"In app purchasing is disabled for this device (in Settings > General > Restrictions).  Please enable this setting to purchase more competitions.") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];
        [alertView release];
    }   
}

...

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
    DLog(@"response: %@", response);
    DLog(@"invalid product identifiers: %@", response.invalidProductIdentifiers);

    for (SKProduct *product in response.products) {
        DLog(@"product: %@", product);

        [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationGotProductInfo object:nil userInfo:[NSDictionary dictionaryWithObject:product forKey:@"product"]]];

        SKPayment *payment = [SKPayment paymentWithProduct:product];

        SKPaymentQueue *paymentQueue = [SKPaymentQueue defaultQueue];
        [paymentQueue addTransactionObserver:self];
        [paymentQueue addPayment:payment];
    }
}

- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
    DLog(@"request failed: %@,  %@", request, error);

    [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationRequestProductInfoFailed object:nil userInfo:[NSDictionary dictionaryWithObject:error forKey:@"error"]]];
}

- (void)requestDidFinish:(SKRequest *)request {
    DLog(@"request finished: %@", request);
}

None of the log messages in the three delegate methods are appearing.

This works fine on 3GS, iPhone 4, iPad etc but not on the iPhone 3G running 4.2.1.

Can anyone provide any insight?

  • 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-05-24T18:59:36+00:00Added an answer on May 24, 2026 at 6:59 pm

    You shouldn’t release SKProductsRequest *request right after you start the request, but should have released it in both delegate methods. Check the documentation for parent SKRequest class which says:

    When this method (requestDidFinish or request:didFailWithError:)
    is called, your delegate receives no further communication from the
    request and can release it.

    I don’t know why this worked for you in newer versions of SDK, but strictly looking at your code, request could potentially be released before the response could have invoked the delegate methods.

    This is how I would do it:

    - (void)requestPurchaseOfCompetition:(Competition*)competition {
        DLog("");
    
        if ([SKPaymentQueue canMakePayments]) {
            DLog(@"do store");
    
            NSString* productIdentifier = [NSString stringWithFormat:@"%@%@_%@", kPRODUCT_IDENTIFIER_PREFIX, competition.competitionId, competition.season];
    
            SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:productIdentifier]];
    
            [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationRequestProductInfo object:nil userInfo:[NSDictionary dictionaryWithObject:request forKey:@"request"]]];
            request.delegate = self;
            [request start];
    
        } else {
            DLog(@"no store");
    
            // Warn the user that purchases are disabled.
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Store", @"Store") message:NSLocalizedString(@"In app purchasing is disabled for this device (in Settings > General > Restrictions).  Please enable this setting to purchase more competitions.", @"In app purchasing is disabled for this device (in Settings > General > Restrictions).  Please enable this setting to purchase more competitions.") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [alertView show];
            [alertView release];
        }   
    }
    
    ...
    
    - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
        DLog(@"response: %@", response);
        DLog(@"invalid product identifiers: %@", response.invalidProductIdentifiers);
    
        for (SKProduct *product in response.products) {
            DLog(@"product: %@", product);
    
            [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationGotProductInfo object:nil userInfo:[NSDictionary dictionaryWithObject:product forKey:@"product"]]];
    
            SKPayment *payment = [SKPayment paymentWithProduct:product];
    
            SKPaymentQueue *paymentQueue = [SKPaymentQueue defaultQueue];
            [paymentQueue addTransactionObserver:self];
            [paymentQueue addPayment:payment];
        }
        [request release];
    }
    
    - (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
        DLog(@"request failed: %@,  %@", request, error);
    
        [[NSNotificationCenter defaultCenter] postNotificationOnMainThread:[NSNotification notificationWithName:kStoreKitHandlerNotificationRequestProductInfoFailed object:nil userInfo:[NSDictionary dictionaryWithObject:error forKey:@"error"]]];
        [request release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App A has this BroadcastReceiver in its manifest (within <application>): And this receiver: public
My app has been accepted by Apple and I just downloaded the version from
My app has a select box for users to choose a venue. This select
My app has many controls on its surface, and more are added dynamically at
My app uses a WebRequest at certain points to get pages from itself. This
My app has a DataGridView object and a List of type MousePos. MousePos is
my app has a submit feedback form. Is there a way to can capture
The app in question is already localized into a few languages, but I'm adding
app.yaml application: cloudymovie version: 1 runtime: java welcome_files: - test.jsp handlers: - url: /test/*
App Store We have been developing an app for quite some time now for

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.