Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS In-App Purchases: Sandbox Invalid Product ID

Background on the slightly odd setup before I get to the problem: Working on an app for a client and we're using an different iTunes developer account than the one this will eventually be published on for development and Ad-Hoc builds of an app that has Game Center and IAP integration. Obviously, we'll eventually have to duplicate our setup on the final release account, but the issue seems to be unrelated.

The issue is trying to test In-App Purchases in the sandbox. We do not have any Tax/Banking info in the interim account, it was not set up in my name so I can't just add mine. Right now, every time we send an SKProductsRequest with the Product Identifier for the product I've added in the iTunes Connect portion of the account for the interim app, it is returned in the response as an invalid product identifier.

This request where identifiers is an array with the string product identifier I'm trying to get:

_productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:identifiers]];
_productsRequest.delegate = self;

And this delegate method:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
   /*Other code for handling valid responses*/ 

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

Returns this log for the identifer:

 -[InAppPurchaseManager productsRequest:didReceiveResponse:] Invalid product id: [Product ID That matches the one in ITC exactly]

I know ITC is working in the interim account because all our GameCenter sandbox integration is working fine through that.

Other things to note:

  • Same results on Simulator and multiple devices.
  • Logged out of normal iTunes/App store accounts on sim and all devices.
  • Tried waiting 24 hours and trying again.
  • Tried adding a different Product and trying its identifier (though I didn't wait 24 hours on this one).
  • Took a look at this: Resolving invalid product id issue with in-app purchases? and didn't see anything terribly helpful, unfortunately.

At this point, I'm stumped. Other than getting the person who set up this interim account to add their tax/banking info, is there anything I can do to actually get a valid product back from the SKProductsRequest?

Any help would be greatly appreciated. Thank you!

like image 613
DesignatedNerd Avatar asked Oct 04 '12 22:10

DesignatedNerd


People also ask

What is product ID in In App Purchase IOS?

A: A product identifier is a string used to uniquely identify every product you wish to sell from your application. The App Store uses it to retrieve information about a product. It is a string identifier that can only contain alphanumeric (A-Z, a-z, 0-9), underscore (_), and period (.) characters.

What does the purchase identifier was invalid mean?

Typically, it is an issue with the developer's production server not being able to be validated by Apple.

How do I enable in app purchases Xcode?

In the Xcode Project navigator, select the StoreKit configuration file. Choose Editor > Enable Interrupted Purchases.


1 Answers

Wound up having to get everything moved over to the final account, which did have banking and tax info. Exact same code that returned invalid product IDs was totally fine once I set the IAP up with the same name in the other account's app.

So yeah, you need the banking and tax info to even test in the sandbox. Boo-urns.

like image 59
DesignatedNerd Avatar answered Sep 22 '22 13:09

DesignatedNerd