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.
Prerequisites
Section titled “Prerequisites”- 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:
aegil permissionsThis outputs the complete catalog of permissions (camera, location, microphone, photoLibrary, etc.) and the exact XML/plist keys generated for each platform.
Never edit native platform directories
Section titled “Never edit native platform directories”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:
- Edit
specs/platforms.tspin Zone 1. - Run
aegil build. - Aegil updates the native manifests deterministically and updates the cryptographic hash lock in
.aegil/manifest.json.
Never edit native folders by hand: Modifying
Info.plistorAndroidManifest.xmldirectly triggersERR_TAMPERED_GENERATED_FILEduring verification.
What could go wrong?
Section titled “What could go wrong?”| 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. |
Next steps
Section titled “Next steps”- Explore Full-Stack Runtime Architecture.
- Learn Flutter UI & Reactive BLoCs.
- Review Permissions and Platforms Reference.