In-App purchases products missing when testing in Testflight

We have a problem using StoreKit. In development, using the Simulator, everything runs fine using the xcode environment, but when we archive the app to be distributed using Testflight, the app starts and requests the available products, but it finds none.

How is that possible?

In the development build we are setting a StoreKit configuration file and it is syncronised with the configuration and products set in the Appstore connect panel. Maybe we have to remove the file when building the archived version for Testflight?

This is our getProducts function:

func getProducts(withHandler productsReceiveHandler: @escaping (_ result: Result<[SKProduct], IAPManagerError>) -> Void) {

    onReceiveProductsHandler = productsReceiveHandler
 
    guard let productIDs = getProductIDs() else {
        productsReceiveHandler(.failure(.noProductIDsFound))
        return
    }
    
    print("productIDs count: "+String(describing: productIDs.count));
    
    let request = SKProductsRequest(productIdentifiers: Set(productIDs))
 
    request.delegate = self
 
    request.start()
}

Any ideas? Thank you.

Answered by App Store Commerce Engineer in 753228022

Do you have a Paid Apps agreement completed in App Store Connect?

Accepted Answer

Do you have a Paid Apps agreement completed in App Store Connect?

That was it, thank you.

In-App purchases products missing when testing in Testflight
 
 
Q