-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS doesn't recognise purchase after closing/reopening the app #1606
Comments
I understand it's a workaround but do not do this:
As mentioned in the documentation, "restorePurchases" should only be called when the user clicks the "restore purchases" button. This call will ask for the user appstore password (except if they already logged in in the last 15 minutes, like just after downloading the app). Can you share the startup logs when the non consumable is owned (without that call)? |
Sure! Here is the related Xcode startup log:
And from inside the app once started:
The first On each receiptUpdate I check if it is for desired product (I have only 1 in my app) like so:
|
Sorry the logs do not contain enough information to see what happens. Can you please include the content of the localReceipt? Set logs level to debug |
No problem! Here is the log with DEBUG verbosity.
And here is what I see after I press RESTORE PURCHASE:
|
Perhaps this may be related to iOS 18? It seemed to have worked prior to some few weeks ago when I started getting user emails. Perhaps if I added server-side validation of receipt it would work? If I add server-side validation now, would that ignore previous purchases? Thank you in advance. |
I spent many more days trying to figure this out. While I can't possibly know if this is true - perhaps it could have to do with using a different IAP adapter for Cordova a while back. Possibly receipts that were created by the previous platform somehow are not recognized when the app initializes today - but are recognized when Restore is initiated. Could this be the issue? |
I have the same problem and my real device is not ios 18. I have test in different devices in the sandbox. all the devices have the same problem. only restore purchase seem to fix it. Did you ever find the cause and solution? |
Unfortunately I was unable to figure this out so I moved to Revenuecat's plugin. My app works now. |
Thanks for the reply, I'm using cordova, revenuecat is still supporting cordova? I think i'll jump over there too. i have been messing with this plugin for 3 days with no luck. |
Yes, you are right. They are gradually dropping support - but we should be good for another 1-2 years. |
I also saw this https://qonversion.io/ while searching for alternative to this plugin. Do you know if qonversion any good? |
Observed behavior
Making a purchase works (product is owned).
Next app load - receipt shows product is not owned.
Only after hitting restorePurchase does the receipt show the product as owned
Not using validation.
App has one single product.
Expected behavior
Product owned persists.
Code
Currently forcing the
restorePurchases()
on random event (when app starts). Otherwise, product will be shown asnot owned
.The text was updated successfully, but these errors were encountered: