I’ve been seeing a lot of errors in my analytics where no product is returned from
Purchases.shared.products
although the provided string identifier is valid.
I’ve double checked everything, the product identifier, the app name, the code and RevenueCat’s config as well.
This doesn’t happen all the times, since some of our clients are still able to buy the product.
Could someone point me towards a possible explanation?
Thanks for reading!
Sofia
Best answer by sundeep
@yodagile jedisquad if you’re getting empty products or offerings you may want to check out this guide first to see if it answers your question. Usually this is a result of a configuration issue:
@Sofia CHEVROLAT sorry for the delayed response here. What is the exact error you are getting - is it “Could not find SKProduct from identifier”?
If this error isn’t happening for your app consistently, it is usually a case where the request to Apple failed to get the products (such as the user experienced a network error retrieving the products). It could also be that the device or Apple account is not authorized to make in-app purchases: https://support.apple.com/en-us/HT204396
In both of these cases, there isn’t necessarily something wrong with your implementation.
@yodagile jedisquad if you’re getting empty products or offerings you may want to check out this guide first to see if it answers your question. Usually this is a result of a configuration issue:
@Sofia CHEVROLAT sorry for the delayed response here. What is the exact error you are getting - is it “Could not find SKProduct from identifier”?
If this error isn’t happening for your app consistently, it is usually a case where the request to Apple failed to get the products (such as the user experienced a network error retrieving the products). It could also be that the device or Apple account is not authorized to make in-app purchases: https://support.apple.com/en-us/HT204396
In both of these cases, there isn’t necessarily something wrong with your implementation.
Unless the device goes offline right after our check, this doesn’t seem to fit with this explanation.
Is there any other possible issue that could cause this?
So this error can happen when the request to Apple for the products fails for any reason. We don't get a meaningful error message from Apple so it's difficult to say exactly why it might happen. It could be that Apple's servers were down right then. But also, even if the device is online, the request can fail in isolation, such as if it times out.
I’m having this same issue. When testing on RevenueCat’s API docs, all the products return properly. When loading on the device, only 1 product is returned (our oldest).
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.