I added in-app-purchase (one non-consumable, "unlock premium" item) to my iOS App, and during testing on iphone8 (dev.prov) with sandbox user, it works nicely.
However, when I send for review (distr prov), they reject it, as purchase fails with "Cannot connect to iTunes Store". They attached a screenshot.
I set up everything properly (tax/bank info, bundle id, in-app-purchase item, itunesconnect, apple dev site, etc). All apple services status are green. Searching all forums, helps, code, etc in the last days, but I do (as I see) everything as I should.
To tell you, during test, I also had sometimes "Cannot connect to iTunes Store" errors, but usually re-try solved it. This was on 11.0.2. Yesterday I upgraded to phone to 11.2.6 (same as apple reviewers use), since that, I had no even occasionally "Cannot connect to iTunes Store", works like charm. Create new sandbox tester, logout AppleStore on phone, reinstall app, initiate purchase, enter new sandbox tester appleid/pwd, and purchase complete. Repeat with other sandbox email, works. Repeat, works...
Restore purchase - also works.
If I uninstall and purchase again with the same testers, it asks "do you want to get the item for free" - also works as it should.
But for reviewers, it fails.
What else can I do in this case?
Edit:
Their message starts: We discovered one or more bugs in your app when reviewed on iPad running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.
I tried doing purchase with "airplane" mode, and I got the same error: Cannot connect to iTunes Store. But I expect testers don't test IAP without internet, that would be stupid, and my error message would be proper that case.
However, I did not test on IPv6 (I don't have), could it be that my App IAP does not work on IPv6, thus behaves like in "airplane" mode?
You should test on IPv6 as well. See the link below on how to set up an IPv6 testing network on your mac. If IAP does work for you on IPv6, I would write the review team and ask them to either try again or provide you with more info on how to reproduce the issue.
http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/
Also, please note that many developers have been having issues with the sandbox environment lately:
https://forums.developer.apple.com/message/300072
Just an update, after a while, after a few ping-pong with review team, it got accepted, and since that, it works fine (also for review team during app updates).
Probably some internal issues they had.
Quick question, if my in-app purchases are listed on iTunes Connect as "Waiting for Review", should I be able to test them in a sandbox environment? Atm I'm getting an error that no products are available, but I'd like to make sure it's because of that and not an error on my end, just to speed things up. I'm using Unity to build my app and the store is built using their tutorial that can be found here: https://unity3d.com/learn/tutorials/topics/ads-analytics/integrating-unity-iap-your-game . The store does work on Android just fine btw. Thanks!
You should be aware of that if your app uses a brand new IAP but is not reviewed yet, your new release will crash immediately after it launches.
The experience was expensive for me :)
So, first make the IAP got approved. Then publish the build.
Well usually before you submit your app and your IAP too Apple to review everything and accept it you're supposed to have tested all your IAP and taken screenshots of them working.
So yes they should work before they're even sent to be reviewed.
You might want to follow those steps to make sure you've set everything up correctly : Adding In-App Purchase to your Applications
So I've tested my application's In App Purchase content at length during development using the Sandbox mode.
For some reason now that the application is live in the App Store when clicking the purchase button nothing happens at all.
It looks like the Apple review team was able to successfully complete a purchase based on server logs (could be wrong about this tho).
I'm using SwiftyStoreKit to handle in app purchases.
Any ideas why it would work perfectly during development and in sandbox mode and not even do anything when calling the SwiftyStoreKit.purchaseProduct method in production?
If I had to guess it has to do with the App Store servers needing time to process everything. It took a little bit to appear on the App Store. But I'm not completely confident that is the issue.
All the sudden this seems to be working. It now asks for the Touch ID to confirm purchase. So it looks like it was an App Store server propagation issue.
Currently My app's Version 2.0 is live.
Recently I have uploaded version 2.1. I have made sandbox mode disabled from app which I am using for renewal subscriptions.
Now My app V2.1 is in waiting for review status. During this period when I am testing the app, it shows me [Environment:Sandbox] while testing In-App purchases.
I am trying to make in app purchase by downloading the app from test flight i.e. V2.1
V2.1 is in waiting for review mode and I am trying to restore my in app purchases with V2.1 which I already bought with V2.0.
Will this sandbox environment be disabled automatically by apple once the app is live?
Or there is anything I am missing?
Can anyone please help me out?
Thanks a lot in advance.
What you mean by "I have made sandbox mode disabled from app which I am using for renewal subscriptions."?
You won't get sandbox once you use app downloaded from AppStore. It's related to how the app is signed - test flight build is ad-hoc distributed which implies you get sandbox.
You can't disable sandbox in your app. Your provisioning profile will control which servers the IAP process looks at. You need to generate an app that's signed for Release to access the Prod IAP server.
I've recently released an iPad app which has a non-consumable "pro upgrade"-style In-App-Purchase.
It works for most users, and it worked when testing. However, I do get daily reports of the IAP crapping out for some customers of the app.
It is the worst kind of bug:
For most people, it seems to work fine.
For some people, it works after a reboot of the device or logging out from the App Store.
For
some other people, nothing seems to help and they can't make the
purchase.
And I do not have any remote logging implemented...
This seems to happen across various locales / different iPad models / OS versions.
For those which can't make the purchase, usually an error pops up which says that their Apple ID password is incorrect, after confirming the purchase.
The purchase button in the app only appears after the IAP product was received from Apple's server successfully.
I am not sure how to track down what's going on there. I was initially thinking it's on Apple's side, but the number of people reporting it tells me it must be something with my app.
Any best practices on how to debug this?
thanks!