chore: sync plus with upstream main (plus-preserving)
What
Merge upstream/main from ionic-team/capacitor into plus while keeping Cap-go package names, versions, CI policy, and known plus fixes.
Why
Automatic PR https://github.com/Cap-go/capacitor-plus/pull/226 preferred upstream in conflicts and dropped plus-only behavior. This branch redoes the sync with explicit resolution.
Upstream range merged
Commits b3c769e856c826b1174518877cf86ac7ce73bf09 (merge base with plus) through 8b89254e21d7af2f22067c61efa9612456a9479d (tip of upstream/main at merge time), 53 commits.
Supersedes
https://github.com/Cap-go/capacitor-plus/pull/226
Audit vs origin/plus at aae0414e
git diff origin/plus...HEAD touches two paths only. Everything else matches plus (no regressions to plus-only CLI, tests, docs, or changelogs).
| File | Resolution |
|---|---|
cli/src/ios/update.ts | merged both: plus unchanged for pluginSuppliesAppDelegate, Cap-go iOS resolution, and existing from or exact Package.swift logic; upstream pre-generatePackageFile Promise.all that patches from: lines when major drift is detected |
ios/Capacitor/Capacitor/CapacitorBridge.swift | merged both: plus cookie or HTTP prompt path unchanged; upstream scene lifecycle guard uses triggerDocumentJSEvent after subsequent load instead of a one-line eval |
All of CHANGELOG.md, android/cli/core/ios/CHANGELOG.md, core/http.md, cli/src/telemetry.ts, cli/src/util/xcode.ts, and the listed CLI tests: kept plus (byte-identical to origin/plus).
CI: .github/workflows/ci.yml matches plus (SHA pins, 10 minute timeouts).
Deleted lines vs origin/plus (git diff origin/plus...HEAD \| grep '^-[^-]')
Count: 1 (one removed content line in the diff, from replacing the old eval with the guarded triggerDocumentJSEvent path).
Justification: That single removal is the direct eval(js: ...triggerEvent...) line in triggerSceneLifecycleJSEvent. It is superseded by upstream behavior: wait for subsequent load and a non-loading web view, then call triggerDocumentJSEvent, which still delivers the same document event without duplicating injection logic.
Testing
bun run lintat repo root (ESLint and Prettier; SwiftLint skipped on Linux).bun run testincli/(155 tests).
Not tested
- Local
bun run verifyunderios/(no macOS Xcode in this agent).
Note: branch name is cursor/sync-plus-upstream-manual-20261106-baee (required cursor/ prefix for this agent). Content matches the intended sync/plus-upstream-manual-20261106 work.


![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- Bug Fixes
- Scene lifecycle events are now handled only for the active scene and when the web view is ready, preventing events from being sent at the wrong time.
- The web view now advances its loading state after every successful navigation, while restoring opacity only after the initial load.
- Changes
- SPM updates no longer rewrite mismatched Capacitor version requirements or display warnings about those mismatches.