I am using Swift 5, and created IAP product with Auto-Renewal subscription.
I am able to get product if in debug mode and Debug executable is checked.
Project Scheme image link
but if I uncheck the Debug Executable then its returning zero products.
Even if I archive build and upload to TestFlight , its not returning product.
I am using below method to get product:
// MARK: - SKProductsRequestDelegate
extension IAPManager: SKProductsRequestDelegate {
public func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
print("Loaded list of products...")
let products = response.products
guard !products.isEmpty else {
print("Product list is empty...!")
print("Did you configure the project and set up the IAP?")
productsRequestCompletionHandler?(false, nil)
return
}
productsRequestCompletionHandler?(true, products)
clearRequestAndHandler()
for p in products {
print("Found product: \(p.productIdentifier) \(p.localizedTitle) \(p.price.floatValue)")
}
}