Detect App Review Mode with Environment Variables
Quickly detect if your iOS app is under App Store review.
Detecting if your app is actively being reviewed by Apple can streamline internal analytics and feature flag management. While common techniques (checking IP addresses, device types, battery levels) prove unreliable, using specific environment variables guarantees accuracy.
During Apple’s review process, two environment variables consistently appear:
- CFNETWORK_DIAGNOSTICS
- CFNETWORK_HAR_LOGGING
If either is present in the process info environment, your app is under review. Use this Swift snippet:
1
2
let underReview = ProcessInfo.processInfo.environment["CFNETWORK_DIAGNOSTICS"] != nil ||
ProcessInfo.processInfo.environment["CFNETWORK_HAR_LOGGING"] != nil
Rely on these variables instead of fragile methods like IP tracking or hardware characteristics, providing definitive detection without violating Apple guidelines.
For more details, refer to Apple’s ProcessInfo documentation.
☕ Support My Work
If you found this post helpful and want to support more content like this, you can buy me a coffee!
Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏