Closed aboedo closed 3 days ago
tagging @MarkVillacampa here too since he's worked on these checks quite a bit
1 Message | |
---|---|
:book: | Size increase: 1.67 KB |
Generated by :no_entry_sign: Danger
Note: this was only an issue in production, because of this check which would early-return true in sandbox
@tonidero yeah I definitely still don't love this solution. Maybe it makes sense to limit its effects to macOS for the sake of minimizing impact... Or to give the asynchronous isSandbox approach another try, even though that one feels a lot more impactful in terms of the changes
closing in favor of https://github.com/RevenueCat/purchases-ios/pull/3875
Addresses #3871
Solves the issue by ensuring that the calls to
isSandbox
are performed on a worker thread, and that we're pre-loading the values.I'm not a huge fan of this solution since it isn't technically perfectly safe, meaning that it's possible (albeit very unlikely) for us to still check sandbox values in the main thread.
Additionally I don't love how hard it is to actually write tests for it.
The ideal solutions would be:
isSandbox
to make it asynchronous... which would be a BIG refactor, affecting a large chunk of the codebase. It doesn't feel worth the trouble.