App Completeness - Apple IAP issues

I’m trying to release my second app in App Store, but the review team always send me the same message. How can I detect the test environment like the following message explained?

Message from App Review:

Hello,

Thank you for your resubmission. Upon further review, we identified an additional issue that needs your attention. See below for more information.

If you have any questions, we are here to help. Reply to this message in App Store Connect and let us know.

Guideline 2.1 - Performance - App Completeness

We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, your app was unresponsive when we attempted to initiate a purchase. Please review the details and resources below and complete the next steps.

Review device details:

  • Device type: iPad
  • OS version: iOS 16.6

Next Steps

When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code “Sandbox receipt used in production,” you should validate against the test environment instead.

Thank you for your resubmission. Upon further review, we identified an additional issue that needs your attention. See below for more information.

If you have any questions, we are here to help. Reply to this message in App Store Connect and let us know.

If IAPs are working for you in your test environment and you have the necessary entitlements (if any are required for IAPs) in your production provisioning profile, this is probably an error on the reviewer’s part. You should test again at your end and if it’s working you might consider appealing it.

If that still doesn’t work, there’s probably something wrong with solar2d’s handling of IAP receipts. Are you using some external plugin for IAP?

Based on what you said in the other thread, it sounds like there is a problem with your implementation of in-app purchases on iOS. Because there are so many different potential failure points in in-app purchases, it is very hard to debug from the outside.

A good starting point is to use IAP Badger- it is robust and not terribly hard to implement. If you are still having problems, then that is an indication that the issue might be something to do with your set up of IAP on the Apple side.

IAP Badger is a little bit more complicated than it used to be since it is no longer actively developed as a plugin, but all you need to do is download it from the repo and put it as a .lua file in your main directory and require it as a library. There is extensive documentation from the developer on GitHub that walks you through the setup.

To make it compatible with changes to Google’s IAP, there are a couple of changes that need to be made to the code, but they are not extensive, and I’ve documented the changes I made to have it run successfully here:

Also, for what it’s worth, I don’t use the “new” iOS billing plugin- I still use the one that’s built in to Solar2D.

No, I only use the plugin.apple.iap
The same module I created for IAP works perfecty for android, besides my provisioning profile was well created.

You mentioned that this was your second app. Does your first app use IAP? If it does, and it works, then there is probably an issue with how things were set up on the Apple side.

The first app have the same set up for Apple IAP. I’ve recently checked that the products are loaded successfully.

If I understand your problem correctly, on your second app you can’t get IAP to work when loaded onto device via TestFlight. (And, consequently can’t get through app review, but the larger problem is that IAP on your second app doesn’t work on iOS.) If I have misunderstood the problem you are trying to solve, please let me know.

What I want know is if in-app purchase work on your first app, either “live” or when loaded onto device via TestFlight. I ask because if IAP works on your first app but not on your second app, and you are using the same implementation on both apps, then there is probably a problem with how you have set things up in App Store Connect.

Does this line of thinking make sense, or have I fundamentally misunderstood some part of your problem?

I’m not sure IAPs would work in my first app. I never tested it, it just got rejected on App Store Connect like 4 times and then it got accepted.
But I remember downloading it once from the App Store and trying to make a purchase and nothing happened.

Having tested your first app, I can now say with confidence that you have a fundamental problem somewhere in your IAP code as it relates to iOS. I’m going to return to my suggestion that you look into IAP Badger.

Not sure forcing him to use a (no longer supported) library is the way forward… maybe he just needs to fix his code?

I use the core plugins without any issues

Bottom line- with three tweaks IAP Badger still works, and any roll-your-own solution is also “not supported” except by the work you put into it to keep it current, so if you’re having trouble, why not start from a baseline that works?

I’ve just figured out what is causing this issue. I found the bellow article in Apple documentation. I had not yet filled in my Banking and Tax information on App Store Connect.

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

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

  • Agree to the latest Apple Developer Program License Agreement.
  • Complete all the financial agreements as described in the Agreements, Tax, and Banking Overview. When you renew your developer membership, see if you need to make updates to your agreements. When your developer membership expires, your financial agreements expire as well.
  • Your app uses an explicit App ID.
  • Clear the in-app purchases for sale in App Store Connect. See Set availability for in-app purchase.
  • Modified in-app purchases are available to the App Store servers.
  • The product identifier specified in App Store Connect matches the identifier used by the SKProductsRequest object in your app.
  • Upload the content of your product to App Store Connect. See Upload in-app purchase content to App Store Connect.

You realise that is nonsense as IAP Badger is still using the core plugins right?

I made my IAP class some 7 years ago, and give or take a plugin change, it has worked flawlessly.

1 Like

Give or take a plugin change so has IAP Badger. :man_shrugging: