Skip to content
axint docs

Entitlements & Info.plist

Apple’s App Intents framework requires two separate pieces of metadata for most non-trivial intents: entitlements (for capabilities like HealthKit, Calendars, HomeKit) and Info.plist usage descriptions (for human-facing permission prompts).

Axint lets you declare both on the intent itself and emit merge-ready XML fragments with --emit-entitlements and --emit-info-plist.

Declare it

intents/LogWorkout.intent.ts
import { defineIntent, param } from "@axint/compiler";
export default defineIntent({
name: "LogWorkoutIntent",
title: "Log Workout",
description: "Logs a workout to HealthKit.",
domain: "health",
params: {
activity: param.string("Activity type"),
duration: param.duration("How long the workout lasted"),
},
entitlements: ["com.apple.developer.healthkit"],
infoPlistKeys: {
NSHealthUpdateUsageDescription: "Log workouts to HealthKit.",
NSHealthShareUsageDescription: "Read workout history for validation and summaries.",
},
});

Emit the fragments

Terminal window
axint compile intents/LogWorkout.intent.ts \
--emit-info-plist \
--emit-entitlements

You get two new files next to the Swift:

LogWorkoutIntent.entitlements.fragment.xml
<dict>
<key>com.apple.developer.healthkit</key>
<true/>
</dict>
LogWorkoutIntent.plist.fragment.xml
<dict>
<key>NSHealthUpdateUsageDescription</key>
<string>Log workouts to HealthKit.</string>
<key>NSHealthShareUsageDescription</key>
<string>Read workout history for validation and summaries.</string>
</dict>

Merge these into your Xcode target’s .entitlements and Info.plist files and you’re done. If you prefer to author the permission copy later, use placeholder strings in infoPlistKeys and tighten them before ship.

Validator rules

Two validator rules fire on this surface:

  • AX108 (warning) — entitlement identifier doesn’t match the <reverse-domain>.<capability> pattern.
  • AX109 (warning) — Info.plist key isn’t one of the standard Apple prefixes (NS, UI, CF, etc.).

Both are warnings, not errors — you can suppress them if you have a good reason, but 99% of the time they’re catching a typo.