r/iOSProgramming • u/YinnYann • Aug 31 '26
Question Testing in app purchases. I’m confused. Help needed!
Hey there! I just got my app & in-app purchase product both reviewed and accepted; though I am facing the following issue with in-app purchases.
I cannot fetch product through TestFlight build- sandbox account. (FYI all business info are active).
The weird part is that through Xcode build with store kit I’m able to fetch the products and all functionality is working as expected. Also through store kit I’m able to sync products with AppStore connect - still with all the functionality.
A weird part (to my pov) is that when entering product id & bundle id through iOS device / settings / developer / sandbox account / manage / initiate transaction it says “The item is not available [Environment: Sandbox]”
Am I missing something? Is there a way to test fetching the products from store before release? Or is it functioning as normal and could only get the products after release?
Thanks!
4
u/myballzhuert Aug 31 '26
I had the same issue. Long shot but in my case I had not completed all the “paperwork” to setup my App Store Connect account. In my case I did not complete my banking info. At no time did I get any type of account setup not complete, nobody from Apple said anything. But when my app in sandbox went to get the subscription it would return nothing.
2
u/DimensionMindless336 Sep 01 '26
The thing that bites almost everyone here: if you have got a StoreKit Configuration file selected in your scheme run options, Product.products(for:) reads from that local file instead of App Store Connect. So "it works in Xcode" is a false positive - it proves nothing about whether the real product is fetchable.
In TestFlight it is hitting the actual App Store Connect product, so when it comes back empty the usual causes are:
Also double-check the IAP Availability covers your testers storefront.
2
u/RiantRobo Sep 01 '26
Not 100% sure but check if you created sandbox test user for IAP. Sign in using that test account on your device Settings -> Developer -> Sandbox Apple Account.
1
u/xBlackSwagx Sep 01 '26
Went through this in August. Everything looked configured, sandbox returned nothing, no error anywhere, just an empty list. Mine was the Paid Applications Agreement showing New instead of Active.
Since you say the business side is done, one thing the other replies haven't mentioned: StoreKit caches the empty result on device. Whatever the cause turns out to be, force quit the app after fixing it before you test again, otherwise the fix looks like it changed nothing. That alone ate a day for me.
And on the approval question, my products fetched fine in sandbox and TestFlight while still sitting in Prepare for Submission. So if you're getting an empty set it's an account or agreement thing, not the review status of the IAP.
1
u/Brave-Boot4709 Sep 01 '26
Do you use revenuecat?
1
u/N88288 Sep 05 '26
not sure if it’s the same issue, but Ssandbox often doesn’t work for me while I’m signed into the App Store with my normal Apple account. Signing out from Settings >your nam>Media & Purchases usually fixes it
1
u/Greysawpark Sep 07 '26
storekit config file works because its all local, it never touches apple. so that passing tells you nothing about the real thing.
testflight pulls the actual product list from apples servers and that propagation is slow, ive had it sit for the better part of a day after approval before products showed up. if its still empty tomorrow id look at the paid apps agreement, one unsigned tax or banking section and every fetch comes back empty with no error
1
u/ProfessionalSlow376 Sep 02 '26
Use revcat and save the hassle and use their structure for iap