-
Notifications
You must be signed in to change notification settings - Fork 795
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
Verify Receipt fails for Apple Reviewer and keeps on rejecting app (Error: SwiftyStoreKit.ReceiptError error 2). #545
Comments
Was there any update to this, I am having a similar issue and can not reproduce what the Apple reviewers are seeing. |
It appears that a lot of developers are having the same issue with the library. I'm going to start looking into this and will get back to you as soon as I have more information. In the meantime, community investigation and support would be mighty helpful. |
Iam having the same issue. |
This is urgent and high priority issue. I'm getting consistent app rejections from Apple because they are unable to complete the receipt verification due to SwiftyStoreKit.ReceiptError error 2 requestBodyEncodeError. The error occurs right after the following IAP popup during the receipt verification. My guess is that the error is in the URLs for AppleReceiptValidator:
Apple does not want the client/app to call the App Store server verifyReceipt endpoint directly. What is interesting is that the error does not occur during debug/testing and the AppStore production environment. Only during the app review Sandbox environment. I even downgrade to SwiftyStoreKit 0.15.0 and I still get the same Apple app rejection. |
@Sam-Spencer, @RomanPodymov, do you have any ideas? |
This is quite a perplexing case, my only suspicion is that perhaps Apple blocks or has a different internal redirect to the sandbox verify service for its testers? This was a critical issue for an app that needed an update, so for now I have used local validation with: https://github.com/tikhop/TPInAppReceipt which seems to work nicely. I haven't submitted yet but am hopeful it will go through. |
Hello everybody. "We found that your in-app purchase products exhibited one or more bugs when reviewed on iPhone running iOS 13.5.1 on Wi-Fi." Next Steps I tried using SwiftyStoreKit 0.15.0 and 0.16.0, the result is identical - rejected. |
I have the same problem! I still get information from apple: When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead. |
Is there a workaround already? I need this urgently |
@janczakb , we needed an update approved urgently, I have managed to get Apple approval now by verifying receipts locally. In other words you can use SwiftyStoreKit for everything else except receipt verification.
|
@wicheda Could you send me an example of use? I will be very grateful |
Hi @janczakb , it depends exactly what verification logic you want. But you need to add the TPInAppReceipt library to your project as per their instructions. Then instead of calling SwiftyStoreKit.verifyReceipt , you add a new method, something like:
So you'll need to call validate when you want to check after a purchase / restore and at the bottom of validateReceipt add whatever checking logic your app needs. I hope that helps. |
When testing my application by Apple testers, the "SwiftyStoreKit.purchaseProduct" method returns an "unknown" error |
Hi @janczakb , it sounds like you more likely have issues with your products set up then, rather than this specific issue around sandbox receipt validation? SwiftyStoreKit.purchaseProduct is working for me for Apple testers (or certainly was yesterday when it was approved). |
Guys, I had implemented the verified receipt from the server side and apple accepted it now....it seems now they are blocking verifying receipt from mobile |
I have a different case. I'm not verifying the receipt locally, but do it in the server but got the error |
I want to know if this problem is solved?
Hello,I have encountered this problem too, is it finally solved? |
Why is SwiftyStoreKit.localReceiptData empty after successful purchase I don’t see the problem on iOS, but it often appears on MacOS |
`func buyProduct(product: SKProduct,orderId: String) {
` This is my code |
I think the best solution to this is to remove this buggy library and create a wrapper by yourself. |
Anyone so far got the solution? am facing the same issue. What am doing is if recceiptURL is not existing, I send a force fetch receipt to the apple server. But my build got rejected with prompting message "Receipt Error 2". The mentioned in the review message that first I need to hit to the production server and if that fails then I should go for sandbox server. Cannot produce the issue in local build and on testFlight. Anyone got the solution..? |
Did you get the solution? am facing the same issue. |
Did you get the solution? am facing the same issue. |
@wicheda did you try the library and is it working for you as I am having receipt validation error for Mac Catalyst my iOS version with Code is approved though |
Is this working for you? |
Bug Report
After successful purchase, Verify Receipt Works for us, but not for Apple reviewer. They are getting below error and keeps on rejecting app.
(SwiftyStoreKit.ReceiptError error 2).
To Reproduce
Expected behavior
Should come in success block and proceed further. Purchase is successful, verify receipt is failing.
Platform Information
Screenshots
The text was updated successfully, but these errors were encountered: