Use AppTransaction.environment for sandbox detection#6154
Use AppTransaction.environment for sandbox detection#6154ajpallares wants to merge 46 commits intomainfrom
AppTransaction.environment for sandbox detection#6154Conversation
📸 Snapshot Test242 unchanged
🛸 Powered by Emerge Tools |
|
@RCGitBot please test |
fire-at-will
left a comment
There was a problem hiding this comment.
Looking good! A few questions/comments, but I think this is on the right track :D
…(now it's only cached by `SandboxEnvironmentDetector`)
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
@RCGitBot please test |
|
@RCGitBot please test |
| /// | ||
| /// On iOS 16+, this attempts to use `AppTransaction.environment` for more reliable detection. | ||
| /// On older OS versions (and in case of failure to retrieve), it falls back to checking the receipt file path. | ||
| final class SandboxEnvironmentDetector: SandboxEnvironmentDetectorType { |
There was a problem hiding this comment.
Not sure if it helps much but for simplification we could have one SandboxEnvironmentDetector hold on to two specific implementations that also conform to SandboxEnvironmentDetectorType, one for the legacy code path and one for SK2. We could test them easily in isolation as well.
There was a problem hiding this comment.
Yep. We could do that. Honestly, I though about doing it like that initially but thought it might be overcomplicating things... I don't have a strong opinion though
There was a problem hiding this comment.
Can also understand that reasoning. If it's a clean cut behind the protocol it might be worth it, if you need to implement specifics it might indeed be overcomplicating it. Not a strong opinion either :)
This reverts commit c3dfa67.
* [TEMP]: only run the CI that we want to run * only await when AppTransaction is available * decrease timeout from 10s -> 3s * dont run tests when on ios version that they shouldnt be run on * swiftlint * test fixes * compilation fix * test fix * Revert "[TEMP]: only run the CI that we want to run" This reverts commit 9aa0b2c.
* make carthage installation tests async * [TEMP]: run carthage tests
|
@RCGitBot please test |
Description
AppTransaction.environmenton iOS 18+ instead of relying solely on the receipt file pathAppTransactionis unavailable