WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
293831
Crash when using libswiftWebKit APIs in iOS 18.5 simulator
https://bugs.webkit.org/show_bug.cgi?id=293831
Summary
Crash when using libswiftWebKit APIs in iOS 18.5 simulator
Elliott Williams
Reported
2025-05-30 14:51:28 PDT
Some apps fail to launch in iOS 18.5 simulator with an error that says: ``` Library not loaded: /usr/lib/swift/libswiftWebKit.dylib ``` and later, variations of: ``` tried: '... Build/Products/Debug-iphonesimulator/libswiftWebKit.dylib' (no such file) ``` This happens to apps that have a deployment target of iOS 18.3 or older, and use WebKit APIs which are annotated with NS_REFINED_FOR_SWIFT. These are: ``` WKPDFConfiguration.rect WKWebView.callAsyncJavaScript(_:arguments:in:in:completionHandler:) WKWebView.callAsyncJavaScript(_:arguments:in:contentWorld:) WKWebView.createPDF(configuration:completionHandler:) WKWebView.pdf(configuration:) WKWebView.createWebArchiveData(completionHandler:) WKWebView.evaluateJavaScript(_:in:in:completionHandler:) WKWebView.evaluateJavaScript(_:in:contentWorld:) WKWebView.find(_:configuration:completionHandler:) WKWebView.find(_:configuration:) WKWebsiteDataStore.proxyConfigurations ```
Attachments
Add attachment
proposed patch, testcase, etc.
Elliott Williams
Comment 1
2025-05-30 14:52:03 PDT
rdar://152200884
Elliott Williams
Comment 2
2025-05-30 15:16:34 PDT
At this time, there are some workarounds that developers can use for testing and debugging in iOS 18.5 simulator: Option 1: Change your app's deployment target to iOS 18.4 or later. 1. Set `IPHONEOS_DEPLOYMENT_TARGET = 18.4` in build settings, or use Xcode's UI: Select the app's target in a xcodeproj file, then go to General > Minimum Deployments > iOS and set it to 18.4. 2. Rebuild the app. --- Option 2: Set DYLD_FALLBACK_LIBRARY_PATH in the app's run action. This will allow you to test in iOS 18.5 simulator while continuing to deploy to older OS versions. 1. Find the simulator runtime's path using `xcrun simctl list runtimes -v`. It will be a path like "/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime". 2. Add "Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift" to this path. 3. In Xcode, navigate to the launch arguments pane of your app's scheme. (Product > Scheme > Edit Scheme > Run > Arguments). Add a "DYLD_FALLBACK_LIBRARY_PATH" environment variable, whose value is the path you computed. It will be something like this: ``` DYLD_FALLBACK_LIBRARY_PATH = /Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/System/Cryptexes/OS/usr/lib/swift ``` 4. Run the app (no need to rebuild).
Elliott Williams
Comment 3
2025-05-30 16:00:23 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/46146
EWS
Comment 4
2025-06-05 09:48:26 PDT
Committed
295876@main
(d53b778e73ac): <
https://commits.webkit.org/295876@main
> Reviewed commits have been landed. Closing PR #46146 and removing active labels.
Elliott Williams
Comment 5
2025-06-05 11:45:01 PDT
Re-opening for pull request
https://github.com/apple/WebKit/pull/3150
EWS
Comment 6
2025-06-05 13:37:54 PDT
Committed
289651.558@safari-7621-branch
(074e23185bb1): <
https://commits.webkit.org/289651.558@safari-7621-branch
> Reviewed commits have been landed. Closing PR #3150 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug