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

    1. List the entitlements the build ships: `codesign -d --entitlements :- MyApp.app` on the archived app.
    2. Remove capabilities the app does not use in Xcode (Signing & Capabilities), or from Expo config plugins and app.json `ios.entitlements`.
    3. Keep debug-only entitlements in a Debug .entitlements file that the Release configuration does not use.
    4. 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 app

    References

    Related checks (M8)