コルダバから離れるときの変更点
Capacitor は、ホストするウェブアプリと同じように動作するネイティブアプリです。実際の Xcode と Android Studio のプロジェクトを配信し、既存のウェブ code を維持し、Capacitor-優先の API でプラグインをモダナイズします。
移行チェックリスト (実用的な順序)
1) Cordova アプリを検証する
現在の状態をエクスポートし、移行入力として保存する:
# In your Cordova project
cordova plugin list
cordova platform ls - config.xml 設定 (オリエンテーション、ステータス バーなど)
- プラグイン変数 (API キー、マニフェストプレースホルダー、URL スキーム)
- 使用しているカスタムフック/スクリプト
- アプリ内で手動でネイティブエディット
platforms/
2) CapacitorをWebアプリに追加する
bun add @capacitor/core @capacitor/cli
bunx cap init ビルド出力フォルダと一致するように 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 プラグイン置き換えマップ
__CAPGO_KEEP_0__-First プラグイン置き換え
| マイグレーションは「ほとんど機能する」プラグインの動作を受け入れる最悪の時期です。リスクの高いプラグイン (認証、決済、バックグラウンドサービス) を早期に置き換えることが重要です。 | 使用例 | Recommended Capacitor Replacement |
|---|---|---|
| カメラ撮影 | 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 |
| OTA / ライブアップデート | Ionic Appflow | @capgo/capacitor-updater |
Browse Capgo's plugin catalog and map by capability: Capgoのプラグイン.
__CAPGO_KEEP_0__のプラグイン
These prompts are designed to produce usable outputs (tables, checklists, plans), not vague advice.
Plugin Replacement Plan の作成
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). config.xml の Preferences を Capacitor + Native Changes に変換する
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. 実機テスト計画 (Cutover Test Plan)
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 Skills for AI Agents (Migration-Friendly)
AI コーディングエージェント (Cursor, Claude Code、など) を使用している場合、エージェントが Capacitor のマイグレーションに従う一貫したプレイブックを持っている場合、結果が良くなります。 Capgo は、Capacitor: プラグイン、ベストプラクティス、デバッグ、CI/CD、ライブアップデートのオープンソーススキルを公開しています。
詳細はこちら Capacitor Skills for AI Agents.
すべてのオプションを含むものが必要ですか?
既存のユーザーに対するアップグレードパスリスク、プラグインのバックローカー、またはアプリストアのブロッカーの懸念がある場合は、完全なマイグレーションを実行できます。