medium · M8 · MASVS-PLATFORM-3 · PTKD-TD-UNUSED-ENTITLEMENT
Entitlement declared but not used in code (text search)
The app's entitlements ask for a capability (for example HealthKit, NFC or Apple Pay) but no code uses it. App Review asks why, which holds the review; for capabilities like HealthKit an unexplained entitlement is a rejection.
How it is exploited
Not an attack: the project started from a template that turned on HealthKit and NFC. No code uses them, but the signed app still asks for them, so App Review asks what the app does with health data and holds the review until someone answers.
Why it matters
A held review (days), or a rejection under 2.5.1 when the capability has no visible use.
How to fix it
- List the entitlements the build ships: `codesign -d --entitlements :- MyApp.app` on the archived app.
- Remove capabilities the app does not use in Xcode (Signing & Capabilities), or from Expo config plugins and app.json `ios.entitlements`.
- Keep debug-only entitlements in a Debug .entitlements file that the Release configuration does not use.
- For capabilities you keep, describe the feature in the description and the App Review notes.
Does your app have this?
PTKD checks your build or your source project for PTKD-TD-UNUSED-ENTITLEMENT and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- JavaScript obfuscation in the build
- 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