swiftin-app-purchaseskproduct

In-App purchase SKProduct not received from SKProductsRequest


I had 3 In-App purchases (non-renewable subscriptions) in the App store connect account, all Approved and retrieved in the code successfully

Then I added one more free non-renewable subscription In-App purchase, submitted to the app store New In-App purchase is Approved, all agreements are active, tax and banking info is ok, product identifier in the code is the same as in the App Store connect

enter image description here enter image description here enter image description here enter image description here

I request all four products in SKProductsRequest But in the productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) I receive three old In-App purchase SKProducts, but product identifier of the new In-App purchase is received in invalidProductIdentifiers

func fetchProducts() {
    let request = SKProductsRequest(productIdentifiers: ["mentalmind.kz.free", "mentalmind.kz.threemonth", "mentalmind.kz.sixmonth", "mentalmind.kz.oneyear"])
    request.delegate = self
    request.start()
}

func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
    print("received products: \(response.products.map({ $0.productIdentifier }))")
    print("invalid product ids: \(response.invalidProductIdentifiers)")
    DispatchQueue.main.async {
        self.products = response.products
    }
}

Console output:

received products: ["mentalmind.kz.oneyear", "mentalmind.kz.sixmonth", "mentalmind.kz.threemonth"] 
invalid product ids: ["mentalmind.kz.free"]

Is it Apple's fault, or you have any code recommendations for me?


Solution

  • Unfortunately I do not know what was the issue, Apple support did not help me But I created new In-App Purchase with cheapest price, but not free and it worked fine in the App Store Connect May be problem was because the In-App purchase was free