Cordova → Capacitor
Days Med riskCapacitor, 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-mushior@mushi-mushi/web) in the Cordova app, keep the sameprojectIdandapiKey. 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 plugin | Capacitor 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
- Step 01Create a migration branch
- Step 02Install Capacitor in the existing project
- Step 03Build your web bundle once before adding platforms
- Step 04Add native platforms
- Step 05Regenerate splash screens and icons
- Step 06Replace Cordova plugins with Capacitor equivalents
- Step 07Add @mushi-mushi/capacitor
- Step 08Audit native permissions (`Info.plist`, `AndroidManifest.xml`)
- Step 09Re-wire deep links and custom URL schemes
- Step 10Remove Cordova
- Step 11Smoke-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), setserver.iosScheme: "ionic"incapacitor.config.jsonto keep the origin Cordova used and avoid losing user data. - Splash hide timing.
@capacitor/splash-screenhides itself afterlaunchShowDurationby default (launchAutoHide: true). To hide it when your app is ready instead, setlaunchAutoHide: falseand callSplashScreen.hide()once your app is mounted. whitelistplugin gone. Capacitor uses native ATS (iOS) andusesCleartextTraffic(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.
Related guides
- Capacitor → React Native, if you later want to move on from Capacitor.
@mushi-mushi/capacitorSDK reference- Capacitor bottom-dock notes: keep the Mushi Mushi widget above your tab bar.
References
Last updated on