Fix an issue where sandbox detector would return false in simulator builds.#2275
Fix an issue where sandbox detector would return false in simulator builds.#2275clindsay3 wants to merge 2 commits into
Conversation
…uilds. When running in the simulator, the receipt does not seem to be named sandboxReceipt, even though purchases are always made in the sandbox.
|
@chrisvasselli So excited that you made a PR already 🥳 My gut says that |
NachoSoto
left a comment
There was a problem hiding this comment.
Looks like we ran into the same thing and solved it in a different way: #1730
But if this isn't isolated I agree checking the target environment would be appropriate.
Thanks for sending a suggested PR! Let me expand on this and remove the custom detector for our integration tests since that wouldn't be necessary anymore.
|
Thanks! Closing this in favor of #2276. |
|
Actually I like @joshdholtz idea to keep those tests and improve |
|
@NachoSoto @joshdholtz great, glad I could help! 👍 |
Checklist
purchases-androidand hybridsMotivation
I have extensive UI tests checking various upgrade and conversion scenarios in my app. I recently transitioned from on-device receipt checking using StoreKit 1 to RevenueCat, and my tests were failing because the simulator was being treated as a non-sandbox environment.
Description
When running in the simulator, the receipt does not seem to be named sandboxReceipt, even though purchases are always made in the sandbox. This change handles this case.
I have tried to update the unit tests where appropriate, although currently there are some SystemInfo tests that are failing. I wasn't sure exactly the best approach to updating those tests, and would welcome suggestions on how to update them.