Update (06.08.2025): Fixed in iOS beta 5
Something has changed in iOS 26 (tested on beta 4) and now if custom scheme is used and web page contains script element then WebKit is terminated with following log:
Update (06.08.2025): [b]Fixed in iOS beta 5[/b] Something has changed in iOS 26 (tested on beta 4) and now if custom scheme is used and web page contains script element then WebKit is terminated with following log: [code]0x1130bc170 - [PID=47858] WebProcessProxy::didClose: (web process 0 crash) 0x1130bc170 - [PID=47858] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash < /code> Шаги по воспроизведению: < /p>
Создать WkWebView с помощью пользовательской конфигурации и пользовательской схемы схемы URL < /li> загружать html с элементом скрипта, который ссылается на другой файл < /li> < /ol> wked reblect /> Фактический результат: wkwebview завершен < /p> Пример кода: < /p> final class CustomSchemeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad()
let sampleConfiguration = WKWebViewConfiguration() sampleConfiguration.setURLSchemeHandler( SampleURLSchemeHandler(), forURLScheme: "sample" )
final class SampleURLSchemeHandler: NSObject, WKURLSchemeHandler { private func post(_ body: String, mimeType: String, urlSchemeTask: WKURLSchemeTask) { let body = Data(body.utf8)
[/code] он работает нормально с файлом CSS внутри, без тега скрипта или с атрибутом Async Код образца проекта https://github.com/igor-palaguta/ios26ureschemeTermination