Skip to content

chore: sync upstream PR #8635 - fix(ios): guard plugin event listener state against concurrent access - #173

Closed
riderx wants to merge 47 commits into
plusfrom
sync/upstream-pr-8635
Closed

riderx wants to merge 47 commits into
plusfrom
sync/upstream-pr-8635

Conversation

@riderx

@riderx riderx commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Merge Conflict Review Required

The sync of upstream PR ionic-team#8635 from @orleib-lab encountered merge conflicts.

Original PR: ionic-team#8635

What happened

  • Git applied the upstream-preferred merge strategy
  • This PR requires CI and manual review before merging

Synced from upstream by Capacitor+ Bot


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

Github Workflow (on behalf of markemer) and others added 30 commits May 7, 2026 16:55
Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
Co-authored-by: Joey Pender <joey.pender@outsystems.com>
Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
Co-authored-by: Mark Anderson <mark.anderson@outsystems.com>
…#8476)

Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
…am#8492)

Co-authored-by: Mark Anderson <mark.anderson@outsystems.com>
ItsChaceD and others added 9 commits August 31, 2026 16:49
…ermissions (ionic-team#8400)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
CAPPlugin stored eventListeners and retainedEventArguments in plain
NSMutableDictionary/NSMutableArray instances with no synchronization.
addListener/removeListener run on the plugin's dispatch queue while plugins
call notifyListeners from arbitrary threads, so concurrent reads and
mutations crashed in -[__NSDictionaryM objectForKey:] inside
notifyListeners:data:retainUntilConsumed:.

Guard every access with an os_unfair_lock and never invoke listener
callbacks while holding it: notifyListeners and retained event delivery
snapshot the listeners inside the critical section and call out afterwards,
so listeners can re-enter the plugin (for example remove themselves)
without deadlocking. getListeners now returns a snapshot.

Fixes ionic-team#8157
@riderx

riderx commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging.

@github-actions

Copy link
Copy Markdown

Beta npm build

Maintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing.

Comment /publish-beta <package> after the PR checks are green.

Examples:

/publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/core

If exactly one workspace package changed, /publish-beta without a package will use that package.

Packages:

  • core (@capacitor-plus/core)
  • cli (@capacitor-plus/cli)
  • android (@capacitor-plus/android)
  • ios (@capacitor-plus/ios)

The workflow will:

  • publish a prerelease package on the beta tag
  • update this comment with the install command

Security note: beta publish is only enabled for branches inside this repository.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 36d767fb-fcf2-4074-b040-5474d29ec46c

📥 Commits

Reviewing files that changed from the base of the PR and between cc067ab and 7e243bc.


⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock

📒 Files selected for processing (35)
  • .github/workflows/ci.yml
  • android/capacitor/src/androidTest/AndroidManifest.xml
  • android/capacitor/src/androidTest/java/com/getcapacitor/android/HttpInterceptorNavigationTest.java
  • android/capacitor/src/androidTest/java/com/getcapacitor/android/InterceptorAllowingPlugin.java
  • android/capacitor/src/androidTest/java/com/getcapacitor/android/TestHostActivity.java
  • android/capacitor/src/main/assets/native-bridge.js
  • android/capacitor/src/main/java/com/getcapacitor/Bridge.java
  • android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java
  • android/capacitor/src/main/java/com/getcapacitor/Plugin.java
  • android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java
  • android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
  • android/capacitor/src/test/java/com/getcapacitor/plugin/SystemBarsTest.java
  • cli/src/declarations.ts
  • cli/src/ios/update.ts
  • cli/src/tasks/migrate-uiscene.ts
  • cli/src/tasks/migrate.ts
  • cli/src/tasks/run.ts
  • cli/src/util/spm.ts
  • cli/src/util/xcode.ts
  • cli/test/migrate-uiscene-plist.spec.ts
  • cli/test/migrate-uiscene-scan.spec.ts
  • cli/test/xcode.spec.ts
  • core/native-bridge.ts
  • core/system-bars.md
  • ios-pods-template/App/App/Info.plist
  • ios-spm-template/App/App/Info.plist
  • ios/Capacitor/Capacitor.xcodeproj/project.pbxproj
  • ios/Capacitor/Capacitor/CAPPlugin.m
  • ios/Capacitor/Capacitor/CAPSceneDelegateProxy.swift
  • ios/Capacitor/Capacitor/CapacitorBridge.swift
  • ios/Capacitor/Capacitor/WebViewAssetHandler.swift
  • ios/Capacitor/Capacitor/WebViewDelegationHandler.swift
  • ios/Capacitor/Capacitor/assets/native-bridge.js
  • ios/Capacitor/CapacitorTests/HttpInterceptorNavigationTests.swift
  • ios/Capacitor/CapacitorTests/PluginEventListenerTests.swift

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 5 commits October 12, 2026 10:50
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
@socket-security

socket-security Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​capacitor/​core@​8.5.0 ⏵ 8.5.3100 +110074 +1100100

View full report

cursoragent and others added 3 commits October 12, 2026 11:20
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
@TorichanCapgo

Copy link
Copy Markdown

Superseded by the full upstream main sync (#190).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.