We are trying to implement / test in-app purchase for our subscription purchase in the app. We have done all the steps listed in the documentation on apple's website; and
Our subscription plan is sitting in 'Ready to Submit' state.
However, we are getting an empty response from,
final response = await _iap.queryProductDetails({'com.company.xyz.basic1m'});
debugPrint(" Check: ${response.toString()}"); debugPrint("❌ Responses: ${response.productDetails.map((ProductDetailsResponse)=>ProductDetailsResponse.toString()).toList()}"); debugPrint("❌ Responses: ${response.productDetails.length}");
if (response.notFoundIDs.isNotEmpty) { debugPrint("❌ Not found: ${response.notFoundIDs}"); } else if (response.productDetails.isNotEmpty) { debugPrint("✅ Product loaded: ${response.productDetails.first.title}"); }
The response we get is, flutter: Check: Instance of 'ProductDetailsResponse' flutter: ❌ Responses: [] flutter: ❌ Responses: 0 flutter: ❌ Not found: [com.company.xyz.basic1m]
Note: We are testing with a real device iphone 13 mini via Xcode.
We tried to test using, ''com.apple.test.Subscription1.monthly'', as instructed but we have not been successful with that. And seems like (based on online search), it doesn't work all the time.
We also searched online for a solution, and some of the forums suggest that we have to submit the app for review when adding subscription for the first time. It doesn't mention the same that in the apple documentation. It confusing.
Help and guidance in this regard would be really appreciated.