Key takeaways
- Capacitor fits when you already have a working web app; for a fresh start with heavy native UI, Expo, Flutter or native code may suit better.
- An agent can run the whole setup – install, add platforms, build, sync – if the memory file says where web code lives and what is build output.
- Native plugins that add offline use, notifications or device features are what lifts a wrapped web app above Guideline 4.2.
- The classic agent mistakes: server.url left in the config, edits to generated web assets, missing permission texts and auth that breaks on the app origin.
When Capacitor is the right shell for an agent-built app
Capacitor takes the output of your web build and runs it in a native app with a bridge to device features. Your web framework stays the same – React, Vue, Angular, Svelte or plain JavaScript – and you get two native projects you can open in Xcode and Android Studio.
It is a good choice when:
- you already have a web app that works, for example one built with Lovable, Bolt or by hand with Vite,
- your team knows web technology better than Swift or Kotlin,
- the app is mostly forms, lists, content and dashboards rather than heavy animation or graphics.
It is the wrong choice when the app's value is native interaction – complex gestures, camera pipelines, games – or when you are starting from zero anyway. Then React Native with Expo, Flutter or native code usually serve better. Our blog post on Capacitor alternatives compares it with simpler website-to-app tools, and converting a Lovable app to iOS shows the path from a builder export.
The setup an agent can run for you
Adding Capacitor is a sequence of well-documented commands – ideal agent work. A prompt that works:
Add Capacitor for iOS and Android to this Vite app. App name "Recipe Box", bundle ID com.example.recipebox, web output in dist. Do not set server.url. Run the web build and cap sync, then list every file you changed.
Behind that prompt, the agent runs roughly this:
npm install @capacitor/core
npm install -D @capacitor/cli
npx cap init "Recipe Box" com.example.recipebox --web-dir dist
npm install @capacitor/ios @capacitor/android
npx cap add ios
npx cap add android
npm run build
npx cap sync
npx cap open ios # or: npx cap open android
The result is a capacitor.config.ts with appId, appName and webDir, plus ios/ and android/ folders that you commit. Choose the bundle ID carefully: it becomes your App Store and Google Play identity and cannot be changed after the first release. The iOS project builds only on a Mac with Xcode; the Android project builds anywhere with the Android SDK.
Talk to an AI Code Engineer about shipping your app to the App Store and Google Play.
In a free call we look at what you built, tell you honestly what stands between it and an approved release – and whether you need us at all.
A memory file that keeps the agent out of build output
Capacitor projects have two kinds of files that look editable and are not. The memory file (CLAUDE.md, AGENTS.md or your editor's rules file) must say so:
# Capacitor app – agent notes
## Where things live
- Web source: src/. Native projects: ios/ and android/ (committed to git).
- ios/App/App/public and android/app/src/main/assets/public are build output. Never edit them.
## After changes
- Web code: npm run build && npx cap sync
- New plugin: npm install <plugin> && npx cap sync, then add the iOS usage description and
Android permission it needs and list both in the PR.
- Checks: npx tsc --noEmit, npm test; Android: cd android && ./gradlew assembleDebug
## Rules
- capacitor.config.ts must never contain server.url or cleartext: true in a commit.
- Device features go through wrappers in src/native/ that check Capacitor.isNativePlatform()
and fall back gracefully in the browser.
- Do not change appId, signing settings, version or build numbers.
The wrapper rule keeps the web version working and gives the agent one place to add native behaviour. The server.url rule prevents the most consequential mistake of all, described below.
Plugins that turn a website into an app
Apple's Guideline 4.2 rejects apps that are little more than a website in a frame, and Google Play has a similar policy for webview apps. An agent will happily wrap your site and stop there. Ask it instead for features that only an installed app can offer:
| User benefit | Capacitor plugin | What to watch |
|---|---|---|
| Reminders and updates | @capacitor/push-notifications | APNs and Firebase setup; ask for permission at a sensible moment |
| Photos and scanning | @capacitor/camera | Usage description that names the real purpose |
| Works offline | @capacitor/preferences or a SQLite plugin | Cache the data users need without a connection |
| Native sharing and feedback | @capacitor/share, @capacitor/haptics | Small effort, noticeably native feel |
| Deep links | @capacitor/app | Associated domains and Android app links need verification files |
Read our guides on Guideline 4.2 and the Google Play webview policy before you decide how much native functionality is enough.
Five things agents get wrong in Capacitor projects
- Live reload left on. During development,
server.urlpoints the app at a dev server so changes appear instantly. If it stays in the config, the release build loads whatever that URL serves – or nothing. Reviewers see a different app from the one you built, or a blank screen. - Edits to build output. Changes inside the native
publicfolders vanish at the nextcap sync. The agent "fixes" a bug, the fix disappears, and it fixes it again. - Auth and APIs on the app origin. The web view does not run on your domain: on iOS the default origin is
capacitor://localhost, on Androidhttps://localhost. CORS rules and cookie-based sessions written for your website can fail inside the app. Token-based auth or Capacitor's native HTTP support usually solves it. Google sign-in in an embedded web view is blocked by Google, so use the system browser or a native sign-in plugin – and on iOS, offer Sign in with Apple alongside social login. - Missing native configuration. A plugin installed without its iOS usage description crashes the app the moment it asks for access; on Android, the manifest permission is missing. Make "list required permissions" part of every plugin task.
- Web layout on a phone. Content under the notch or the home indicator, inputs hidden by the keyboard, hover-only interactions. CSS safe-area insets and the keyboard plugin fix most of it – once someone looks at a real device.
Builds, icons and store uploads
The agent can generate icons and splash screens for both platforms from one source image with npx @capacitor/assets generate, bump versions in both native projects and write CI workflows. Store-specific work then splits:
- iOS: archive with Xcode 26 and the iOS 26 SDK on a Mac or macOS CI runner, add a privacy manifest that covers your plugins, complete App Privacy in App Store Connect.
- Android: build an App Bundle with
./gradlew bundleRelease, keep the upload key in CI secrets, use Play App Signing, set the target SDK (Capacitor keeps it inandroid/variables.gradle) to Android 16, API level 36, and fill in the Data safety form.
Our AI Code Engineers take Capacitor apps through signing, CI/CD, listings and review in your own accounts – via the iOS and Android submission services. The App Store review checklist for AI-built apps is a good final check before you submit.
Capacitor with coding agents: checklist
- The bundle ID is final and identical in capacitor.config.ts, Xcode and Gradle.
- The memory file marks the native public folders as build output.
- No server.url or cleartext setting in the committed config.
- Every plugin comes with its iOS usage description and Android permission.
- The app offers native value: offline use, notifications or device features.
- Login and API calls work on the app origins, with Sign in with Apple where social login is offered.
- Safe areas, keyboard handling and touch targets are checked on real devices.
- Release builds come from CI with signing secrets the agent cannot read.
Frequently asked questions
Is a Capacitor app accepted by Apple and Google?
Many Capacitor apps are in both stores. Reviewers judge the result, not the framework: an app that offers real functionality and a native experience is treated like any other app; a thin website wrapper risks a minimum-functionality rejection.
Do I need a Mac for a Capacitor iOS app?
For building and archiving, yes – Xcode runs only on macOS. You can use your own Mac or a macOS CI runner; the agent can write the web code and Android parts on any machine.
Which coding agent works best with Capacitor?
Any agent that can run terminal commands handles the setup: Claude Code, Codex, Cursor and others. What matters more is the memory file and a habit of building both native projects after each plugin change.
Can appsubmitter.io publish our Capacitor app?
Yes. In a free call we review your app and tell you honestly what it needs before review. Our AI Code Engineers can then handle signing, builds, listings and submission in your own developer accounts.
Free, 15 minutes, no obligation
Get your app from agent output to approved release.
Our AI Code Engineers take apps built with Claude Code, Codex, Cursor, Lovable, Base44 and co. through signing, CI/CD, store listings and review – in your own developer accounts.
AI tools, store policies and requirements change quickly – always check the current documentation of the tools and stores you use. This article is independent advice and not affiliated with or endorsed by Apple, Google, Anthropic, OpenAI or any other company or product mentioned; all trademarks belong to their owners.