Skip to Content
v0.8.0 · shippedNative iOS / Android / Flutter / Capacitor SDKs, A2A discovery, SOC 2 readiness, residency, BYO storage, BYOK. Read the changelog →
Migration guidesCordova → Capacitor

Cordova → Capacitor

Days Med risk

Capacitor is the modern successor to Cordova from the same Ionic team. This guide migrates an existing Cordova app to Capacitor in place — same web codebase, new native shell — and re-mounts Mushi using the @mushi-mushi/capacitor plugin.

The official upstream guide is capacitorjs.com/cordova ; this page is the Mushi-aware companion to it.

Why migrate

  • Cordova plugin maintenance has slowed considerably since 2023.
  • Capacitor uses standard WKWebView / WebView instead of Cordova’s managed shell — easier to debug, plays nicer with modern web platform features.
  • Capacitor’s native projects are first-class (ios/, android/) — you can edit them like any other Xcode / Android Studio project.
  • Mushi ships a first-party Capacitor plugin (@mushi-mushi/capacitor); the Cordova SDK has been in maintenance mode since 0.5.

Prerequisites

  • Working Cordova app that builds for at least one platform.
  • Node 18+ and the platform SDKs (Xcode 15+ for iOS, Android Studio Hedgehog+ for Android).
  • Mushi project already created — we keep the same projectId and apiKey.

API mapping (Cordova plugins → Capacitor)

Most popular Cordova plugins have a 1:1 Capacitor counterpart:

Cordova pluginCapacitor equivalent
cordova-plugin-camera@capacitor/camera
cordova-plugin-geolocation@capacitor/geolocation
cordova-plugin-statusbar@capacitor/status-bar
cordova-plugin-splashscreen@capacitor/splash-screen
cordova-plugin-network-information@capacitor/network
cordova-plugin-device@capacitor/device
cordova-plugin-file@capacitor/filesystem
cordova-plugin-inappbrowser@capacitor/browser
cordova-plugin-clipboard@capacitor/clipboard
cordova-plugin-vibration@capacitor/haptics
cordova-plugin-share@capacitor/share
cordova-plugin-firebase-messaging@capacitor/push-notifications + @capacitor-firebase/messaging
cordova-sqlite-storage@capacitor-community/sqlite
Mushi Cordova SDK (deprecated)@mushi-mushi/capacitor

For anything not listed, search the Capacitor Plugins  catalog or the Capawesome community plugins .

Migration checklist

Migration checklist
11 required steps
  1. Step 01
    Create a migration branch
  2. Step 02
    Install Capacitor in the existing project
  3. Step 03
    Build your web bundle once before adding platforms
  4. Step 04
    Add native platforms
  5. Step 05
    Regenerate splash screens and icons
  6. Step 06
    Replace Cordova plugins with Capacitor equivalents
  7. Step 07
    Swap the Mushi Cordova SDK for @mushi-mushi/capacitor
  8. Step 08
    Audit native permissions (`Info.plist`, `AndroidManifest.xml`)
  9. Step 09
    Re-wire deep links and custom URL schemes
  10. Step 10
    Remove Cordova
  11. Step 11
    Smoke-test on a device, including a Mushi report

Common gotchas

  • iOS scheme defaults changed. Capacitor uses capacitor:// by default; if your app stores anything under origin-bound web APIs (cookies, IndexedDB), set server.iosScheme: "ionic" in capacitor.config.json to keep ionic:// and avoid wiping user data.
  • Splash hide timing. Capacitor’s @capacitor/splash-screen doesn’t auto-hide — call SplashScreen.hide() once your app is mounted, or set launchAutoHide: true in config.
  • whitelist plugin gone. Capacitor uses native ATS (iOS) and usesCleartextTraffic (Android) instead of Cordova’s whitelist. Add your Mushi endpoint and any other API hosts to those if you allow non-HTTPS.

Rollback

You branched in step 1, so:

git checkout main # Native projects are gitignored if you followed Capacitor's recommendations, # so deleting the migration branch leaves your Cordova app untouched.

If you committed and pushed before discovering a regression, revert the merge commit; Cordova builds will start working again immediately.

References

Last updated on