- I created two auto renewable subscriptions in App Store Connect, and both their status is
Ready to Submit
; - I also created a sandbox tester in App Store Connect, and I logged it in on my phone settings>sandbox testers, I can it right there;
- When I run my code on a real device, there's no product shows up.
Below is the source code of how I request products(I'm sure the product IDs are correct cause I have double-checked it), and it prints as the fetched result is nothing.
func loadProducts() async{
Task {
do {
products = try await Product.products(for: ["MY_SUBSCRIPTION_ID_1", "MY_SUBSCRIPTION_ID_2"])
// result is: products: []
print("products: \(products)")
} catch {
// Handle any errors here, and no error raises
print("Failed to load product: \(error)")
}
}
}
This is the 1st time I'm trying in-app purchase, hope somebody can help me out, many thanks in advance :)