Skip to Content
v1.36.0 · shipped One-screen report · Looks like your app Read the changelog →
Migration guidesCordova → Capacitor

Cordova → Capacitor

Days Med risk

Capacitor, built by the Ionic team, is a successor to Cordova. This guide migrates an existing Cordova app to Capacitor in place (same web codebase, new native shell) and mounts Mushi Mushi with the @mushi-mushi/capacitor plugin.

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

Why migrate

  • Check whether the Cordova plugins you depend on are still maintained; most common ones have an official Capacitor counterpart (table below).
  • Capacitor’s native projects are first-class (ios/, android/): you commit them and edit them like any other Xcode / Android Studio project.
  • Mushi Mushi has a Capacitor plugin (@mushi-mushi/capacitor) with native shake-to-report and screenshot capture. There is no Mushi Mushi Cordova plugin; in a Cordova app you would have run the web SDK (mushi-mushi) inside the WebView.

Prerequisites

  • Working Cordova app that builds for at least one platform.
  • For Capacitor 8: Node 22+, Xcode 26+ for iOS, Android Studio 2025.2.1+ for Android (environment setup ).
  • A Mushi Mushi project. If you already use the web SDK (mushi-mushi or @mushi-mushi/web) in the Cordova app, keep the same projectId and apiKey. If not, create a free account  (no card) and a project; the Capacitor quickstart shows where the two values come from.

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-mushi (web SDK) in the WebView@mushi-mushi/capacitor (adds native shake and screenshots)

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
    Add @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 Mushi report

Common gotchas

  • iOS scheme defaults changed. Capacitor uses capacitor:// by default on iOS. If your app stores anything under origin-bound web APIs (LocalStorage, cookies, IndexedDB), set server.iosScheme: "ionic" in capacitor.config.json to keep the origin Cordova used and avoid losing user data.
  • Splash hide timing. @capacitor/splash-screen hides itself after launchShowDuration by default (launchAutoHide: true). To hide it when your app is ready instead, set launchAutoHide: false and call SplashScreen.hide() once your app is mounted.
  • whitelist plugin gone. Capacitor uses native ATS (iOS) and usesCleartextTraffic (Android) instead of Cordova’s whitelist. Add your Mushi Mushi endpoint and any other API hosts to those if you allow non-HTTPS.

Rollback

You branched in step 1, so:

git checkout main # Capacitor's ios/ and android/ projects were committed on the migration # branch only, so main still has the Cordova app.

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

References

Last updated on