7

I know this question is asked few times. I have tried all solution but still not succeed. Here is my issue:

In below lines of code I am getting response.products.count = 0 and getting product ids that I have entered as response.invalidProductIdentifiers.

func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {
    if response.products.count != 0 {
        for product in response.products {
            productsArray.append(product )
        }
    }
    else {
        print("There are no products.")
    }
    if response.invalidProductIdentifiers.count != 0 {
        print(response.invalidProductIdentifiers.description)
    }
}

Set up that I have done for IAP :

  1. In Xcode > Target > In-App Purchases is enabled.
  2. In profile I have enabled In-app-Purchase. and attached that profile with project.
  3. In iTunes Connect, created App and added product identifiers for IAP.
  4. BundleID is same in Xcode, apple developer portal and in iTunes connect.
  5. In iTunes Connect App status is "Prepare for submission" and status of In-App purchase are "Waiting for upload" . I have not uploaded binary on iTunes Connect yet.

iTunes Connect

iTunes Connect

Is there need to upload binary at iTunes Connect?

Is there anything I am missing?

pkamb
  • 26,648
  • 20
  • 124
  • 157
Payal Maniyar
  • 3,685
  • 20
  • 47

5 Answers5

4

The contract for paid applications must be in effect in order to receive data about the in app purchases configured.

This worked for me. I had the exact same problem.

https://stackoverflow.com/a/2045064/3901620

pkamb
  • 26,648
  • 20
  • 124
  • 157
KKRocks
  • 7,878
  • 1
  • 14
  • 81
1

If the products do not have Hosted Content, you need to turn it off so that they exit the "Waiting for Upload" state.

Cameron E
  • 1,722
  • 1
  • 18
  • 19
1

The App Store may not recognize your product identifiers unless you have met the following criteria, as applicable:

https://developer.apple.com/documentation/storekit/skproductsresponse/1505985-invalidproductidentifiers

In my case it was:

Your app uses an explicit App ID.

During development I was using a different BundleID than the one declared in App Store Connect.

Community
  • 1
  • 1
pkamb
  • 26,648
  • 20
  • 124
  • 157
0

My In-App Purchase was in a "Missing Metadata" state, and thus Invalid:

How to set up in-app purchases ("Missing Metadata")

pkamb
  • 26,648
  • 20
  • 124
  • 157
0

I had the issue with all the above correctly configured. I found the solution from Apple Doc:

Important Do not use your test user account to sign in to the production environment. Doing so invalidates the test user account, and you can no longer use it.

  • Thus, ensure that in Xcode > Target > Signing&Capabilities: you are in development and not in production.
  • Create a new test user
  • Clean your Xcode build folder
  • Reboot
  • Test with the new user
vomi
  • 547
  • 4
  • 13