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 quite a few in-app-purchase items. I'd like give one or two
@app.route(/<requested_username>/<requested_team>, methods=['GET', 'POST']) ^How do I make this so that no matter what is
My app shows newsfeed from social network. Every feed has different attachments - images,
App has fragment activity with framelayout container matching parent. User interacts with fragments ui
App Engine 1.7.3 was just announced, claiming Django 1.4 is now fully supported for
My app compiles to about 80mb. I was under the impression this was quite
My app fails at this line of code: Dim objConnection As New SqlConnection(Application(ConnString)) My
My app has the following models: user and watch_list. User has attributes id, name
app.yaml application: cloudymovie version: 1 runtime: java welcome_files: - test.jsp handlers: - url: /test/*

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.