Hi,
My app has an IAP and the view that let user to purchase is simply a ProductView. The purchase flow should be handled by the ProductView itself. I have tested the app with xcode storekit configuration, xcode run with sandbox account and also TestFlight environment as well. The purchase is triggered and the app feature is unlocked after purchase. However, I keep getting app review team feedback with the following problem:
Bug description: the purchase button is greyed out after we tapped on it, however, there's no purchase flow popped up
I have tried multiple things. Building with xcode cloud, removing the storekit configuration from the build scheme. But none can get the app review team to get through the problem.
The IAP is not available in certain region. In that case, the app will show a message. However, the app review attached an screenshot which shows the product view.
The view that allow users to purchase
if let product = store.products.first(where: { $0.id == "com.xxx.xxxxxxx" }) {
// If the product is available, show the ProductView
ProductView(id: product.id)
.productViewStyle(.compact)
} else {
// If the product is not available, show a message
Text("In-app purchase is not available in your region.")
}
The store class
@Published private(set) var products: [Product] = []
...
init() {
//To handle the parental approval flow
getUpdateTransaction()
}
func getUpdateTransaction() {
updates = Task {
for await update in StoreKit.Transaction.updates {
if let transaction = try? update.payloadValue {
await fetchActiveTransactions()
await transaction.finish()
}
}
}
}
Does anyone what can go wrong with ProductView? As this is part of the StoreKit API, I don't know what can go wrong. At least the purchase flow should be covered by it.
Also, is sandbox and TestFlight a good way to test IAP?
Thanks!