移动开发

capacitor-app-upgrade-v5-to-v6

cap-go/capgo-skills

Upgrades a Capacitor app from v5 to v6 using `npx cap migrate` from `@capacitor/cli@latest-6`, then the manual checklist - Node 18+, Xcode 15+, Android Studio Hedgehog, AGP 8.2.1, Gradle 8.2.1, compile/target SDK 34, `compileSdkVersion` to `compileSdk`, the `androidScheme` default flipping to `https` (data loss risk), iOS local plugins no longer auto-registered, iOS zoom disabled by default, and official plugin breaking changes (`addListener` returns only a Promise, Camera Photo Picker, Filesystem ctime/mtime numbers). Use when `@capacitor/core` is 5.x and the target is 6.x, or after the upgrade users are logged out on Android, a custom iOS plugin is "not implemented", or `addListener(...).remove` no longer compiles. Do not use for other major versions, plugin library upgrades, or non-Capacitor apps.

  • 648 次安装
  • 74 星标
  • 收录于

安装命令

npx skills add https://github.com/cap-go/capgo-skills --skill capacitor-app-upgrade-v5-to-v6

SKILL.md

Capacitor App Upgrade v5 to v6

Move a Capacitor 5 app to Capacitor 6. Source of truth: https://capacitorjs.com/docs/updating/6-0

When to Use

  • @capacitor/core in the snapshot below is 5.x and the user wants 6.x.
  • After upgrading: Android users lose localStorage/cookies, a local (non-npm) iOS plugin reports "<Name>" plugin is not implemented on ios, pinch-zoom stopped working on iOS, or TypeScript errors around addListener.
  • The user asks for the exact 5 -> 6 checklist.

Do not use:

  • App on 4.x -> capacitor-app-upgrade-v4-to-v5 first. On 6.x -> capacitor-app-upgrade-v6-to-v7. Multi-hop planning -> capacitor-app-upgrades.
  • Plugin library upgrade -> capacitor-plugin-upgrade-v5-to-v6.
  • Moving iOS from CocoaPods to SPM (experimental in 6) -> cocoapods-to-spm.

Live Project Snapshot

Capacitor App Upgrade v5 to v6

Move a Capacitor 5 app to Capacitor 6. Source of truth: https://capacitorjs.com/docs/updating/6-0

When to Use

  • @capacitor/core in the snapshot below is 5.x and the user wants 6.x.
  • After upgrading: Android users lose localStorage/cookies, a local (non-npm) iOS plugin reports "<Name>" plugin is not implemented on ios, pinch-zoom stopped working on iOS, or TypeScript errors around addListener.
  • The user asks for the exact 5 -> 6 checklist.

Do not use:

  • App on 4.x -> capacitor-app-upgrade-v4-to-v5 first. On 6.x -> capacitor-app-upgrade-v6-to-v7. Multi-hop planning -> capacitor-app-upgrades.
  • Plugin library upgrade -> capacitor-plugin-upgrade-v5-to-v6.
  • Moving iOS from CocoaPods to SPM (experimental in 6) -> cocoapods-to-spm.

Live Project Snapshot