Skip to content

Commit

Permalink
Merge pull request #606 from EdgeApp/william/fix-ios-bridgeless
Browse files Browse the repository at this point in the history
Work with React Native bridgeless mode on iOS
  • Loading branch information
swansontec authored Jul 25, 2024
2 parents d8d8511 + 307026a commit e47abab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Unreleased

- fixed: Work with React Native bridgeless mode on Android.
- fixed: Work with React Native bridgeless mode on iOS and Android.

## 2.9.1 (2024-07-24)

Expand Down
3 changes: 2 additions & 1 deletion ios/EdgeCoreWebViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

@objc func runJs(_ reactTag: NSNumber, js: String) {
bridge.uiManager.addUIBlock({ (uiManager, viewRegistry) in
if let webView = viewRegistry?[reactTag] as? EdgeCoreWebView {
let view = uiManager?.view(forReactTag: reactTag)
if let webView = view as? EdgeCoreWebView {
webView.runJs(js: js)
}
})
Expand Down

0 comments on commit e47abab

Please sign in to comment.