title: How to test validate InAppPurchase in iOS with flutter
body: <p>I've been searching far and wide for a solution for my problem but, although I've seen many similar questions, none of them really had the answer.</p>
  
  <p>I'm developing an app using flutter and the in_app_purchase (<a href="https://pub.dev/packages/in_app_purchase" rel="nofollow noreferrer">https://pub.dev/packages/in_app_purchase</a>) plugin. I've followed step by step the plugin and the iOS docs, but I still am not able to test the purchase.</p>
  
  <p>The product is created in the app store connect features panel (let's say it's ID is <code>app_subscription</code>). Since I created and submitted the product, it's "pending for revision" (or something similar, I use the panel in Spanish). I've created a sandbox account to do the tests on the product. Finally, I've implemented the code needed to make the purchase from the app, but when I try to test the purchase from a physical device, I fail, since the queryProductDetails function doesn't finde an product with the <code>app_subscription</code> ID.</p>
  
  <p>Simply put, the code that retrieves the product is like this, as the plugin doc says:</p>
  
  <pre><code>import 'package:in_app_purchase/in_app_purchase.dart';
  ...
  InAppPurchaseConnection _iap = InAppPurchaseConnection.instance;
  ...
  Set&lt;String&gt; ids = Set.from(['app_subscription']);
  ProductDetailsResponse response = await _iap.queryProductDetails(ids);
  print(response.productDetails); // prints: []
  </code></pre>
  
  <p>I started to think that the reason I can't get the product is because it hasn't been validated by the reviewers, but it has been one week and the status hasn't changed. I've filled in all the required metadata, including the screenshot.</p>
  
  <p>Please tell me if you need any more info. </p>
  
  <p>Thanks in advance</p>
  
  <p>EDIT (2019/12/02): App Store has finally accepted my build and published my app, but they put my product in a "needs developer action" status, allegedly because they made a purchase but that was returned... The thing is, I still can't test my own purchase because the code isn't recognized yet. What should I do? I've tried editting my product description and testing the purchase again but it doesn't work...</p>