Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SKProductsRequest delegate methods are never called [closed]

This used to work for me but is now not working anymore and I can't figure out why. I have in-app purchase setup in my app. I confirmed that I have a correct set of product identifiers, matched by corresponding in-app purchase items in itunesconnect. The call goes out to Apple view [productRequest start], but I never get a response back, despite setting the delegate to myself. What am I missing?

NSLog(@"productIdentifiersSet: %@", productIdentifiersSet);
if ([productIdentifiersSet count]) {
    SKProductsRequest *productRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiersSet];
    [productRequest setDelegate:self];
    [productRequest start];
}

………

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
   <never called>
}

- (void)requestDidFinish:(SKRequest *)request {
    <never called>
}

- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
    <never called>
}
like image 892
coneybeare Avatar asked May 27 '10 17:05

coneybeare


2 Answers

The same problem happened to me today. In the morning my code was working, in the afternoon it didn't work for 3-4 hours. I spent all of my time and tried many things. But a little time before, it started working itself. I didn't change anything.

I suppose we can't trust apple servers about that..

like image 120
alper_k Avatar answered Oct 17 '22 01:10

alper_k


Here it's a good check list that can solve this issues:

  1. Go to Settings\iTunes & App Stores, log out of any account, and try again so you’re sure you’re using a Sandbox account.
  2. Check this link – if it doesn’t respond, the iTunes sandbox may be down.
  3. Have you enabled In-App Purchases for your App ID?
  4. Does your project’s .plist Bundle ID match your App ID?
  5. Are you using the full product ID when when making an SKProductRequest?
  6. Have you waited several hours since adding your product to iTunes Connect?
  7. Are your bank details active on iTunes Connect?
  8. Have you tried deleting the app from your device and reinstalling?
  9. After you've created your in app purchase products, remember to add those to your game-app in you app page in ituns connect.
like image 38
Max_Power89 Avatar answered Oct 16 '22 23:10

Max_Power89