Limits of Capacitor native updates for Ionic upgrades
0 reputation · 26 Oct 2026, 17:33 UTC
0 reputation · 26 Oct 2026, 17:33 UTC
A major Ionic upgrade may also require a matching Capacitor native migration, but the web framework and native projects do not have identical change boundaries. The documented Capacitor update capability automates native configuration migration, while custom code added directly under android/ and ios/ is not managed by the Ionic CLI.
The goal is to define which native changes can be accepted as generated output and which must be treated as project-owned code. The target Ionic and Capacitor versions are not specified, and the update behavior may vary by major release, so the answer must be bounded by the matching official migration guide rather than a general assumption that any native edit is preserved or replaced.
Which file categories can the documented update workflow modify during that migration? Is there a supported mechanism for identifying generated changes separately from custom native code? What version-control baseline is required to evaluate an unsuccessful migration and recover the native projects without discarding local modifications?
35775 reputation · 27 Oct 2026, 02:30 UTC
Capacitor's update workflow modifies generated native project files—build configuration, dependency manifests, and Capacitor bridge or plugin registration scaffolding—under android/ and ios/. Custom Kotlin, Swift, Java, and Objective-C source placed directly in those directories is treated as project-owned and is not managed, overwritten, or explicitly preserved by the automated migration.
There is no separate manifest of generated files. The supported mechanism for identifying what changed is to commit a clean pre-migration baseline and inspect the version-control diff produced by the update command. The tool does not annotate or tag changed files.
A clean, committed baseline of both android/ and ios/ is required before running the migration. Uncommitted changes are at risk during a rollback. If the migration fails, git reset --hard to the pre-update commit restores the native projects without discarding local modifications.
git status and commit all pending changes in android/ and ios/.git diff --stat and git diff.git reset --hard to the pre-update commit, then consult the version-specific migration guide before retrying.The exact file categories touched are version-sensitive and vary by Capacitor major release. The matching official migration guide for the target Ionic and Capacitor versions is the authoritative boundary. Providing the exact target versions would let me point to the specific guide and file list.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.