App Native Capabilities
When to use
During phase 4, after the shell exists, when the web app uses a feature that needs native access, plus the baseline mobile UX plugins.
Inputs
- Features the web app uses (file upload, camera input, geolocation, notifications, downloads), target.
Procedure: Capacitor (inside os/<target>)
- Baseline:
npm install @capacitor/app @capacitor/status-bar @capacitor/keyboard @capacitor/splash-screen. - Back button:
App.addListener("backButton", ({ canGoBack }) => canGoBack ? history.back() : App.exitApp()). - Only when used:
@capacitor/camera,@capacitor/filesystem,@capacitor/preferences,@capacitor/push-notifications(needsgoogle-services.jsonfrom the user, never committed if private),@capacitor/geolocation. - Permissions in
android/app/src/main/AndroidManifest.xmlonly for used plugins (CAMERA,ACCESS_FINE_LOCATION,POST_NOTIFICATIONS); iOSInfo.plistusage strings (NSCameraUsageDescription, ...). Request at the moment of use, never at startup. npx cap sync android.
Procedure: Tauri (inside os/<target>)
npx tauri add <plugin>forfs,dialog,notification,shell,updater,store.src-tauri/capabilities/default.json: list exact permissions, for example"fs:allow-read-text-file"with a scope[{ "path": "$APPDATA/**" }], neverfs:defaultover$HOME/**.- Shell: only
shell:allow-openor a scoped sidecar{ "identifier": "shell:allow-execute", "allow": [{ "name": "binaries/<sidecar>", "sidecar": true }] }. - Updater: endpoint HTTPS,
pubkeyin config, private key from env (app-release-manager).
Verification
Each plugin call exercised in a device or desktop test; permission list reviewed by app-security-auditor.
Failure modes and fixes
- Plugin not implemented on web: guard with
Capacitor.isNativePlatform(). - Tauri
not allowederror: permission missing from the capability file.
Deliverable
Plugin list with the permissions each one adds; report step native.


