Why does "NSArray *product = response.products" return no product?

In sandbox testing, I was able to get auto-renewing subscription to work, but decided to switch to one-time in-app purchase. I've read many how-to's, but I'm missing something. My app has Bundle ID com.myname.id1 and IAP capability added. The IAP has Product ID com.myname.id2. My agreements are up-to-date (auto-renewing subscription worked). The In-App Purchases screen lists my IAP under "Drafts (1)"; is this expected? "[SKPaymentQueue canMakePayments]" returns true. "[[SKProductsRequest alloc] initWithProductIdentifiers:set]" (where set contains "com.myname.id2") responds to "[request start]". In the delegate, "NSArray *product = response.products" comes back empty.

Does the IAP have its own Bundle ID?

What am I doing wrong? What have I not told you that's important? I've been stuck for a few days on this. Thanks!

Answered by App Store Commerce Engineer in 747121022

i’m unclear what is failing for you exactly.

  • Are you having the issue with just consumable in-app purchase type or another type?
  • Or is the product request failing or is the buy attempt that isn’t succeeding? If so, what error are you getting?
  • Is this when testing in sandbox, with TestFlight, or in production?

Recommend getting these details and more into a feedback assistant ticket. Include Apple ID, logs, screenshots/recording and sysdiagnose of possible. feedbackassistant.apple.com

Have you tried testing with Xcode storeKit testing?

Accepted Answer

i’m unclear what is failing for you exactly.

  • Are you having the issue with just consumable in-app purchase type or another type?
  • Or is the product request failing or is the buy attempt that isn’t succeeding? If so, what error are you getting?
  • Is this when testing in sandbox, with TestFlight, or in production?

Recommend getting these details and more into a feedback assistant ticket. Include Apple ID, logs, screenshots/recording and sysdiagnose of possible. feedbackassistant.apple.com

Have you tried testing with Xcode storeKit testing?

Thank you for replying!

  • Non-consumable in-app purchase
  • "NSArray *product = response.products" is returning zero products, no error message
  • Sandbox

I had not tried StoreKit testing. I set it up. It's working. Thank you for the idea! I don't yet know why it wasn't working before, but I'll use this method until I submit the app and the in-app purchase. I'll hold off on the feedback assistant ticket for now.

Thank you!

I am facing a similar issue where I am using Product.products(for:) to get products. While subscription products are working correctly, in-app purchases are returning empty.

Why does "NSArray *product = response.products" return no product?
 
 
Q