FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix WKWebView migration issues: sandbox entitlements and API compatibility by Copilot · Pull Request #535 · gitx/gitx · GitHub

/ gitx Public

Fix WKWebView migration issues: sandbox entitlements and API compatibility - #535

Draft
hannesa2 with Copilot wants to merge 24 commits into
masterfrom
copilot/update-pbwebcontroller-for-wkwebview
Draft

Fix WKWebView migration issues: sandbox entitlements and API compatibility#535
hannesa2 with Copilot wants to merge 24 commits into
masterfrom
copilot/update-pbwebcontroller-for-wkwebview

Conversation

Copilot AI commented Mar 20, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Two runtime issues blocking WKWebView functionality:

  1. Sandbox violations: WebContent helper process unable to read network configuration, generating console spam
  2. API incompatibility crash: setDrawsBackground: called on WKWebView which only exists in deprecated WebView

Changes

GitX.entitlements

  • Added com.apple.security.network.client/server for WebContent process network access
  • Added file access entitlements for Git repository handling

PBCommitList.swift/h

  • Changed webView property type from WebView to WKWebView
  • Removed webView.drawsBackground = false (WKWebView is transparent by default)
  • Updated imports from WebKit/WebView.h to WebKit/WebKit.h

Context

WKWebView uses a multi-process architecture where the WebContent helper inherits app entitlements but requires explicit network permissions. The drawsBackground property was removed in WKWebView as background is now controlled via CSS.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix deprecated WebView in PBWebController Migrate from deprecated WebView to WKWebView Mar 20, 2026
Copilot AI requested a review from hannesa2 March 20, 2026 07:27

hannesa2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The tests are failing

Copilot AI commented Mar 20, 2026

Copy link
Copy Markdown
Contributor Author

The tests are failing

Fixed in commit 255998a. The issue was missing closing braces in the changeContentToCommit: method - the completion handler blocks weren't properly closed. The build should now succeed.

Copilot AI requested a review from hannesa2 March 20, 2026 07:42
Copilot AI changed the title Migrate from deprecated WebView to WKWebView Complete WebView to WKWebView migration: fix PBWebDiffController Mar 20, 2026
Copilot AI changed the title Complete WebView to WKWebView migration: fix PBWebDiffController Fix WebView API incompatibilities: windowScriptObject and mainFrame Mar 20, 2026
Copilot AI changed the title Fix WebView API incompatibilities: windowScriptObject and mainFrame Fix WebView to WKWebView migration build failures Mar 20, 2026
Copilot AI changed the title Fix WebView to WKWebView migration build failures Implement missing WKWebView functionality to fix empty window Mar 20, 2026
hannesa2 force-pushed the copilot/update-pbwebcontroller-for-wkwebview branch from ba15830 to a261737 Compare March 20, 2026 10:16
Copilot AI changed the title Implement missing WKWebView functionality to fix empty window Expose setupJavaScriptBridge and userContentController:didReceiveScriptMessage: for subclass override Mar 20, 2026
Copilot AI and others added 15 commits March 21, 2026 16:53
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
…face for subclass override

Co-authored-by: hannesa2 <3314607+hannesa2@users.noreply.github.com>
hannesa2 force-pushed the copilot/update-pbwebcontroller-for-wkwebview branch from 879fc04 to e77a8b9 Compare March 21, 2026 15:54
Copilot AI changed the title Expose setupJavaScriptBridge and userContentController:didReceiveScriptMessage: for subclass override Add LSMinimumSystemVersion to Info.plist for system framework compatibility Mar 21, 2026
Copilot AI changed the title Add LSMinimumSystemVersion to Info.plist for system framework compatibility Add entitlements for WKWebView sandbox compatibility Mar 21, 2026
Copilot AI changed the title Add entitlements for WKWebView sandbox compatibility Fix WKWebView migration issues: sandbox entitlements and API compatibility Mar 21, 2026

tiennou commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Is that even possible? Last I've checked, WKWebView wasn't exposing some of the script stuff we need… somewhere.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL