Search code examples
iosflutterin-app-purchase

Validate In-app purchase product with IOS on flutter application


I have an application created with Flutter. In this one, I want to use in-app purchase by using the library in_app_purchase

But I have some problems on iOS. I try to get the list of the products with:

const Set<String> _kIds = {'product1', 'product2'};
final ProductDetailsResponse response = await 
InAppPurchaseConnection.instance.queryProductDetails(_kIds);
if (!response.notFoundIDs.isEmpty) {
    // Handle the error.
}
List<ProductDetails> products = response.productDetails;

But when I do this, the list of products is always empty. But I created my product (a auto renewal subsciption) on appstoresonnect.

I think it's because in appstoreconnect website, my product is not validated. After every submission, I have the message: "Developper action needed" but I don't know which action I need to do. The only thing "strange" is that I have a red dot in front of every languages but each fields (name and description) are filled. I already try to change it or add or delete some languages but it's always returned with the "developper action needed" message.

This is some pictures (sorry in french) of the message and the details: enter image description here enter image description here enter image description here

Do you have an idea why my product is not validated ? And do you confirm me that it's because of this that my list of products is always empty ?


Solution

  • I find the solution. The list was empty because there was a problem on appstoreconnect but the problem wasn't on the product itself.

    In fact, I needed to fill the tax, agreements and billing section. So I just needed to add a billing account. It was not very intuitive.