Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebKit Playground

Build an open-source version of WebKit and replace it system-wide on iOS jailbroken devices.

  • Mobile Safari
  • 3rd-party browsers (e.g. Chrome, Firefox, Edge)
  • WKWebView
  • UIWebView (i.e. WebKitLegacy)

Compatibility

WebKit Tag Tested on iOS Xcode Version iOS SDK Version Patch File
releases/Apple/Safari-16.1-iOS-16.1 (cherry-picks required) 16.1 14.1 16.1 webkit_iOS_16.3.1-worktree-20260412-004539.patch
16.1.1
16.1.2
releases/Apple/Safari-16.2-iOS-16.2 16.2 14.2 16.2
releases/Apple/Safari-16.3-iOS-16.3.1 16.3.1
releases/Apple/Safari-16.4-iOS-16.4.1 16.4.1 14.3.1 16.4 webkit_iOS_16.4.1-worktree-20260411-143740.patch
releases/Apple/Safari-16.5-iOS-16.5 16.5
16.5.1

How to use

  1. We need to patch dyld to allow DYLD_FRAMEWORK_PATH to work on top of DSC
  2. Check out source code of WebKit and apply patches
  3. Compile WebKit with the following command:
Tools/Scripts/build-webkit --ios-device --release --use-ccache \
WK_USE_CCACHE=YES \
ARCHS='arm64 arm64e' \
ONLY_ACTIVE_ARCH=NO \
GCC_TREAT_WARNINGS_AS_ERRORS=NO \
OTHER_CFLAGS='$(inherited) -Wno-error' \
OTHER_CPLUSPLUSFLAGS='$(inherited) -Wno-error'
  1. Push compiled frameworks to /Library/Frameworks or $JBROOT/Library/Frameworks (RootHide).

Verify Replacement

Use User-Agent to verify that replaced WebKit is active:

  1. Build/apply the patch and deploy frameworks to target device.
  2. Open Safari (or any WKWebView host app) and visit a UA echo page (for example: https://httpbin.org/user-agent).
  3. Confirm the returned User-Agent contains WKDebugUA/1.0.

If WKDebugUA/1.0 is present, traffic is using the replaced WebKit build from this repo.

Troubleshooting

iOS 16.1 required cherry-picks

When building releases/Apple/Safari-16.1-iOS-16.1 for iOS device, apply these 4 commits first:

git cherry-pick --no-gpg-sign \
21349d858b6b \
60cfd7b1e096 \
b594a5e7e91a \
d09b8b302cad

Patch Xcode SDK

If build fails with 'objc/objc-runtime.h' file not found, run:

sudo Tools/Scripts/configure-xcode-for-embedded-development

Build parallelism

If you want to increase compile/build parallelism globally in Xcode, run:

defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 48
defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 48

What they do:

  • IDEBuildOperationMaxNumberOfConcurrentCompileTasks: controls the max number of concurrent compile tasks.
  • PBXNumberOfParallelBuildSubtasks: controls the number of parallel PBX build subtasks in the build graph.

Notes:

  • These are global user defaults and affect Xcode-driven builds on this machine.
  • Restart Xcode after changing these values.
  • To restore defaults:
defaults delete com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks
defaults delete com.apple.Xcode PBXNumberOfParallelBuildSubtasks

About

Build an open-source version of WebKit and replace it system-wide on iOS jailbroken devices.

Resources

Stars

75 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages