Cordova から離れると何が変わるか
Capacitorは、ホストするWebアプリと似たようなネイティブアプリです。実際のXcodeとAndroid Studioのプロジェクトを配信し、既存のWebcodeを維持し、Capacitor-先行APIでプラグインをモダナイズします。
移行チェックリスト (実用順序)
1) Cordova アプリを検証する
今日の状態をエクスポートし、移行の入力として保存してください。
# In your Cordova project
cordova plugin list
cordova platform ls - config.xml 設定 (向き、ステータスバーなど)
- プラグイン変数(APIキー、manifest プレースホルダー、URL スキーム)
- カスタムフック/スクリプトを使用しているもの
- 任意の手動ネイティブエディット内
platforms/
2) ご利用のウェブアプリに Capacitor を追加してください。
bun add @capacitor/core @capacitor/cli
bunx cap init __CAPGO_KEEP_0__を正しく設定してください。 webDir ビルド出力フォルダと一致します (例: dist, build, www).
3) iOS と Android のプロジェクトを追加します。
bun add @capacitor/ios @capacitor/android
bunx cap add ios
bunx cap add android 4) ビルド + 同期
bun run build
bunx cap sync プラグイン置き換えマップ (Capgo-First)
移行は最悪の時期に「ほぼ動く」プラグインの動作を認めるのを避けるべきだ。リスクの高いプラグインを早期に置き換える (認証、決済、バックグラウンドサービス)。
| 用途 | コルダバ プラグイン (例) | 推奨 Capacitor 置き換え |
|---|---|---|
| カメラ撮影 | cordova-plugin-camera | @capacitor/camera + @capgo/capacitor-camera-preview |
| インアプリブラウザ | cordova-plugin-inappbrowser | @nicholasalx/capacitor-inappbrowser |
| バックグラウンド地理位置 | @transistorsoft/cordova-background-geolocation-lt / cordova-plugin-geolocation | @capgo/capacitor-background-geolocation |
| バイオメトリクス | cordova-plugin-fingerprint-aio / cordova-plugin-touch-id | @capgo/capacitor-native-biometric |
| ソーシャルログイン | cordova-plugin-googleplus / cordova-plugin-facebook4 / cordova-plugin-sign-in-with-apple | @capgo/capacitor-social-login |
| SQLite | cordova-sqlite-storage | @nicholasalx/capacitor-data-storage-sqlite / @nicholasalx/capacitor-fast-sql |
| インアプリ購入 | cordova-plugin-purchase | @capgo/capacitor-native-purchases |
| ドキュメントスキャン | cordova-plugin-document-scanner | @capgo/capacitor-document-scanner |
| リアルタイム更新 | Ionic Appflow | @capgo/capacitor-updater |
Capgoのプラグインカタログを機能別に検索してみましょう: Capgoのプラグイン.
AIでコピー&ペーストできる質問
これらの質問は、表、チェックリスト、計画などの使える出力を生成するように設計されています。曖昧なアドバイスは生成しません。
質問1: プラグイン置き換え計画を作成
You are a senior Capacitor engineer.
I am migrating a Cordova app to Capacitor. Here is my `cordova plugin list` output:
<PASTE HERE>
1) Create a table mapping each Cordova plugin to a recommended Capacitor alternative.
2) Prefer official Capacitor plugins when possible.
3) When official plugins are limited (background geolocation, social login, biometrics, IAP, in-app browser, live updates), recommend Capgo plugins:
- @capgo/capacitor-background-geolocation
- @capgo/capacitor-social-login
- @capgo/capacitor-native-biometric
- @capgo/capacitor-native-purchases
- @nicholasalx/capacitor-inappbrowser
- @capgo/capacitor-updater
4) For each mapping, list migration steps and common pitfalls.
Return a prioritized plan (highest risk first). 質問2: config.xmlの設定をCapacitorとネイティブの変更に変換
You are migrating Cordova to Capacitor.
Here is my Cordova `config.xml`:
<PASTE HERE>
Create a migration checklist:
1) What goes into capacitor.config.ts (appId, appName, webDir, server config for dev only).
2) What must be moved to iOS (Info.plist, entitlements, URL schemes, permissions strings).
3) What must be moved to Android (AndroidManifest, Gradle, intent filters, permissions).
Be explicit about file names and what to change. 質問3: 実機テスト計画
You are the QA lead for a Cordova -> Capacitor migration.
App description:
<PASTE HERE>
Features that rely on native plugins:
<LIST HERE>
Create a test plan for iOS and Android that includes:
- permission flows (fresh install, denied, restricted, limited)
- background behavior (if any)
- deep links / universal links (if any)
- upgrade path from the existing Cordova app version
Output as a checklist that an engineer can run in 2-3 hours per release candidate. Capgoのスキル(移行対応)
AIコーディングエージェント(Cursor、ClaudeCodeなど)を使用している場合、エージェントがCapacitorの移行に一貫したプレイブックを使用することで、結果が改善されます。CapgoはCapacitorのオープンソーススキルを公開しています:プラグイン、ベストプラクティス、デバッグ、CI/CD、リアルタイム更新。
All-Inclusive オプションが必要ですか?
アプリストアブロッカー、プラグインのバグ、既存ユーザーのアップグレードパスリスクについて心配している場合、完全なエンドツーエンドの移行を実行できます。