Invalid product id

I have some troubles with in app purchasing. I hope you can help me.


What I have done:


* I've uploaded my binaries to iTunes Connect.

* I've created products in iTunes Connect.

Product name - > Product ids:


1) TestProduct1 -> TestProduct1

2) TestProduct2 -> PrefixTestProduct2

3) com.MyCompanyName.MyAppName.ProductId_5 -> com.MyCompanyName.MyAppName.ProductId_5

4) com.MyCompanyName.MyAppName.ProductId_4 -> com.MyCompanyName.MyAppName.ProductId_4

5) com.MyCompanyName.MyAppName.ProductId_3 -> com.MyCompanyName.MyAppName.ProductId_3

6) com.MyCompanyName.MyAppName.ProductId_2 -> com.MyCompanyName.MyAppName.ProductId_2

7) com.MyCompanyName.MyAppName.ProductId_1 -> com.MyCompanyName.MyAppName.ProductId_1



* All my products have status "Ready to Submit"

* All my products have mark "Cleared for Sale"

* My app in iTunes Connect has state "Prepare for Submission"

* I assign may uploaded binnary app to Build in in iTunes Connect.

* I connect all products to my app in iTunes Connect

* WI-FI on my device is turned on

* I create some Sandbox Testers

* I enabled In-App Purchases for my App ID.

* My project’s .plist Bundle ID match my App ID

* I generated and installed a new provisioning profile for the appropriate App ID

* Project code sign uses appropriate provisioning profile

* I build for ios 8.0

* I've tired to use the full product ID (com.MyCompanyName.MyAppName.ProductId_5) when making an SKProductRequest and also short version (ProductId_5)

* I've waited several days since adding my product to iTunes Connect

* I'v tried deleting the app from my device and reinstalling (with cleaning and rebuild)

* My device doesn't jailbroken

* I sign out in iTunes & App Store on my device



What I have not done:


* My bank details is not active on iTunes Connect? ("Contracts, Tax, and Banking Information") because I don't have them yet. But how I have red in apple documentation it is not necessary for sandbox testing.


I'm trying to receive product information from itunes with this code:


-(void)requestProUpgradeProductData
{
if ([SKPaymentQueue canMakePayments])
  {
  // Display a store to the user.
      NSLog(@"Display a store to the user.");
  }
  else
  {
  // Warn the user that purchases are disabled.
  NSLog(@"Warn the user that purchases are disabled.");
  }

  NSSet* productIdentifiers = [NSSet setWithObjects:
  @"TestProduct1",
  @"TestProduct2",
  @"PrefixTestProduct2",
  @"com.MyCompanyName.MyAppName.ProductId_1",
  @"com.MyCompanyName.MyAppName.ProductId_2",
  @"com.MyCompanyName.MyAppName.ProductId_3",
  @"com.MyCompanyName.MyAppName.ProductId_4",
  @"com.MyCompanyName.MyAppName.ProductId_5",
  @"ProductId_1",
  @"ProductId_2",
  @"ProductId_3",
  @"ProductId_4",
  @"ProductId_5",
  nil];
  productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
  productsRequest.delegate = self;
    [productsRequest start];
}


-(void)productsRequest:(SKProductsRequest*) request didReceiveResponse:(SKProductsResponse*) response
{
  NSArray* products = response.products;
  proUpgradeProduct = [products count] >= 1 ? [products firstObject] : nil;
  if (proUpgradeProduct)
  {
  NSLog(@"Product title: %@", proUpgradeProduct.localizedTitle);
  NSLog(@"Product description: %@", proUpgradeProduct.localizedDescription);
  NSLog(@"Product price: %@", proUpgradeProduct.price);
  NSLog(@"Product id: %@", proUpgradeProduct.productIdentifier);
  }

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

  [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil];
}



But unfortunately I receive respond with all my products in invalidProductIdentifiers.

Sounds like you've done everything except the bank info. Do that and tell us if it worked.

I have a similar problem. I want to test the In-App-Store capability, that we have integrated into our macOS App for Sierra and Hich Sierra. Here is, what we've done in my own words:


  • Enabling capability "In-App-Purchase" in Xcode for the target of our App for the App Store.
  • Defining two product identifiers for a monthly and yearly subscription in a plist file.
  • Impelenting in-app-pruchases with StoreKit.
  • Signing the contract except the tax part, that is in a clarification process with our tax consultant.
  • Defining a product group with two products with the said identifiers and the status "Ready to Submit" in iTunesConnect.
  • Creating a new version of our app in iTunesConnect.
  • Uploading the build of our app with in-app-purchase implementation to iTunesConnect with Xcode.
  • Linking the new version of our app with the said uploaded build in iTunesConnect.
  • Linkinh the new version with the said defined product identifiers.
  • Creating a sandbox user in iTunesConnect.
  • Logging out of the Mac-App-Store on my developer MacBook Pro.
  • Building the app and opening it in Finder.


The first time I opened the app in Finder, I logged into the Mac-App-Store with the sandbox user. For any reasons first sandbox user became invalid. Maybe, because I logged into the Apple-ID-Management service and the sandbox user did became a real user. Therefore I defined another sandbox user. Unfortunately the dialog to log into the Mac-App-Store never appeared again although I cleaned the target build and removed all app files like preferences and container with an Automator script. Maybe there is still something stored in the cache or in any other file, that is not part of my script.


Anyway, my app logs invalid product identifiers. Has someone an idea, how to solve the problem?

TMI. But I suspect the tax consultant is the source of your problem.

Signing the contract except the tax part, that is in a clarification process with our tax consultant.

Thanks for your answer. After we have finalized the contract, the product identifiers became valid.

Try use productid instead of com.yourcompanyname.yourappname.productid

Invalid product id
 
 
Q