WindowsmacOSLinux

Where Does Capacitor Store Config and Platforms?

Capacitor projects center on capacitor.config in the web app folder, with native android and ios shells beside it after cap add.

Last updated

Capacitor inverts the usual hybrid layout: the web app is the source of truth and the native projects are shells around it. The capacitor.config file at the project root names the app, sets the bundled web directory, and configures plugins. The android and ios folders only appear after you add the platforms.

The sync step is the whole workflow. Build the web assets, run cap sync, and Capacitor copies them into both native shells. Native code you write inside android or ios persists; the copied web content does not, so never treat the shells as the asset source.

Where Capacitor stores this, by platform

Windows
[ProjectDir]\capacitor.config.ts

App id, name, web directory, and plugin options. The android and ios platform folders sit beside it after npx cap add. Run npx cap sync to push web builds into both shells.

macOS
[ProjectDir]/capacitor.config.ts

Same project-relative layout on macOS, where the ios folder matters most. Open ios/App in Xcode after syncing; the web assets inside are copies, not originals.

Linux
[ProjectDir]/capacitor.config.ts

Same arrangement. Android Studio opens the android folder after sync. Keep web source in version control and treat synced copies as disposable.

Frequently asked questions

I changed the config but the app ignores it. What syncs it?

Run npx cap sync after changing the config or rebuilding the web assets. Sync copies the built web folder into both native shells and updates native dependencies. Editing android or ios directly works but gets overwritten on the next sync for managed files.

What should I commit versus regenerate?

The native projects stay (they are yours to keep), but Capacitor recreates the web-asset bridge on sync. Commit the config, android, ios, and web source. The standard template ignores nothing you need to regenerate.

Notice an outdated path? Let us know.