Poles
Poles

Reputation: 3682

configuring InAppPurchase for Sandbox testing in ios

I'm configuring In-App-purchase for an app on testing mode.My app isn't live yet. I followed the techniques described in this raywenderlich's link. Though apple has changed the settings and UI of itunes connect compared to the settings described in the link. But the problem is I'm not recieving any products and gettings all products as invalid by the following code:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {

    productsRequest = nil;
    NSArray * skProducts = response.products;
    if(skProducts.count>0)
    {
      NSLog(@"Loaded list of products...%@",response.products);
      for (SKProduct * skProduct in skProducts)
      {
          NSLog(@"Found product: %@ %@ %0.2f",
              skProduct.productIdentifier,
              skProduct.localizedTitle,
              skProduct.price.floatValue);
      }
    }

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

    requsetCompletionHandler(YES, skProducts);
    requsetCompletionHandler = nil;

} 

I also checked the following :

1.Have you enabled In-App Purchases for your App ID? YES

2.Have you checked Cleared for Sale for your product? YES

3.Does your project’s .plist Bundle ID match your App ID? YES

4.Have you generated and installed a new provisioning profile for the new App ID? YES

5.Have you configured your project to code sign using this new provisioning profile? YES

6.Are you building for iPhone OS 3.0 or above? YES

7.Are you using the full product ID when when making an SKProductRequest? YES

8.Have you waited several hours since adding your product to iTunes Connect? Didn't understand that that means!!!

9.Are your bank details active on iTunes Connect? NO

10.Have you tried deleting the app from your device and reinstalling? YES

Now my confusion is, do I have to configure the iOS paid applications contract type? Because my app will be free. enter image description here

Upvotes: 0

Views: 172

Answers (1)

Dipen Panchasara
Dipen Panchasara

Reputation: 13600

Please check the documentation for In-App purchase provided by apple for more details.

Refer Prerequisites section in Apple documentation here

Upvotes: 1

Related Questions