HomeiOS Developmentios - Why am I getting invalidProductIDs for all my In-App Purchases...

ios – Why am I getting invalidProductIDs for all my In-App Purchases despite the fact that product IDs match App Retailer Join?


I’m attempting to retrieve my in-app buy merchandise utilizing SwiftyStoreKit in Swift.

let ids: Set = [monthly_InApp, yearly_InApp, lifetime_InApp]

SwiftyStoreKit.retrieveProductsInfo(ids) { lead to
    if end result.retrievedProducts.rely > 1 {
        for product in end result.retrievedProducts {
            if product.productIdentifier == monthly_InApp {
                Popup.present(message: "(product.productIdentifier)", title: "retrievedProducts")
                self.monthly_Price_Str = product.localizedPrice ?? ""
                self.monthly_Price = Double(truncating: product.worth)
            } else {
                Popup.present(message: "(product.productIdentifier)", title: "retrievedProducts")
                self.yearly_Price_Str = product.localizedPrice ?? ""
                self.yearly_Price = Double(truncating: product.worth)
            }
        }
    }

    if end result.error != nil {
        // Popup.present(message: "(end result.error)", title: "error")
    }

    if end result.invalidProductIDs.rely > 0 {
        // Popup.present(message: "(end result.invalidProductIDs)", title: "invalidProductIDs")
    }
}

Once I run this, I all the time get my product IDs in invalidProductIDs.
I additionally tried utilizing SKProductsRequest instantly, and I see the identical factor:

Invalid IDs from SKProductsRequest: ["com.mkkriti.monthly", "com.mkkriti.yearly"]

What I’ve checked to date:

My product IDs in App Retailer Join are precisely:

com.mkkriti.month-to-month

com.mkkriti.yearly

In App Retailer Join the product standing exhibits Able to Submit.

Bundle identifier in Xcode matches the one in App Retailer Join.

In-App Buy functionality is enabled in Xcode.

Testing on an actual system (not simulator).

Query:

Why do my legitimate product IDs nonetheless present up as invalid when retrieving merchandise?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments