Skip to content
VerificationWould you notice if your agent drifted in production?Explore the 5-stage harness›
Specification Language

Platforms & Device Permissions

This guide explains how to declare target client platforms and device hardware permissions—such as camera access, photo library selection, or geolocation—declaratively in specs/platforms.tsp without manually editing native mobile or desktop configuration files.

  • An existing Aegil project with specs/platforms.tsp.
  • Awareness of target platform app store permission requirements.

Declaring platforms and permissions in specs/platforms.tsp

Section titled “Declaring platforms and permissions in specs/platforms.tsp”
namespace Helpdesk;
@platform({
targets: ["ios", "android", "macos", "web"],
ios: {
bundleId: "com.example.helpdesk",
minimumVersion: "15.0"
},
android: {
package: "com.example.helpdesk",
minSdkVersion: 24,
targetSdkVersion: 34
}
})
app HelpdeskPlatformConfig {}
@permission({
target: "ios",
name: "camera",
description: "Helpdesk needs camera access so you can take photos of damaged equipment."
})
@permission({
target: "android",
name: "camera"
})
@permission({
target: "ios",
name: "photoLibrary",
description: "Helpdesk needs photo library access to attach screenshots to support tickets."
})
app HelpdeskPermissions {}

Listing supported permissions (aegil permissions)

Section titled “Listing supported permissions (aegil permissions)”

To view all supported permissions, targets, and manifest keys supported by your Aegil version:

Terminal window
aegil permissions

This outputs the complete catalog of permissions (camera, location, microphone, photoLibrary, etc.) and the exact XML/plist keys generated for each platform.


All native platform projects are maintained automatically under .aegil/client/:

  • .aegil/client/ios/Runner/Info.plist
  • .aegil/client/android/app/src/main/AndroidManifest.xml
  • .aegil/client/macos/Runner/DebugProfile.entitlements
  • .aegil/client/web/manifest.json

If you need to add a permission, change an app name, or update a bundle identifier:

  1. Edit specs/platforms.tsp in Zone 1.
  2. Run aegil build.
  3. Aegil updates the native manifests deterministically and updates the cryptographic hash lock in .aegil/manifest.json.

Never edit native folders by hand: Modifying Info.plist or AndroidManifest.xml directly triggers ERR_TAMPERED_GENERATED_FILE during verification.


What you see Why What to do
ERR_PERMISSION_UNKNOWN A @permission decorator references a permission name not recognized by Aegil. Run aegil permissions to see the list of supported permission names.
ERR_TAMPERED_GENERATED_FILE A file inside .aegil/client/ was edited directly. Discard changes to .aegil/. Edit specs/platforms.tsp and run aegil build.
Missing iOS permission prompt An iOS permission was declared without a description. Add description: "..." to the @permission decorator explaining why access is needed.