medium · M8 · MASVS-PLATFORM-3 · PTKD-AC-CODE-OBFUSCATION
JavaScript obfuscation in the build
The project obfuscates its JavaScript (javascript-obfuscator, Jscrambler…). Guideline 2.5.19 names code obfuscation as a way of hiding features, and obfuscated bundles get closer scrutiny.
How it is exploited
Not an attack: metro runs javascript-obfuscator on the release bundle 'to protect the API key'. Apple lists obfuscation as a way of hiding features, and the key is still in the bundle for anyone patient.
Why it matters
Closer review and possible rejection under 2.5.19 / 2.3.1, with no real protection for the secret.
How to fix it
- Remove the obfuscation step from the release build.
- Move secrets to a server or edge function; give the app short-lived, user-scoped tokens instead.
- If you must keep obfuscation (licensed code), say so and why in the App Review notes.
Does your app have this?
PTKD checks your build or your source project for PTKD-AC-CODE-OBFUSCATION and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- Export compliance (ITSAppUsesNonExemptEncryption) not declared
- HealthKit app that also ships an ads SDK
- Hardcoded unlock or promo code
- Purchases SDK configured with an empty or test key
- Purchase screen falls back to made-up prices or 'coming soon' text
- False-urgency copy on a purchase screen
- Hardcoded price on a purchase screen
- Free trial without the price it converts to