webView.configuration.websiteDataStore.proxyConfigurations = [proxyConfiguration] crashes app in ios 18

Hi! I configure proxy for webview like

DispatchQueue.main.async {
    self.webView.configuration.websiteDataStore.proxyConfigurations = [proxyConfiguration] 
}

It is fine in iosiOS 17 however, it crashes in iOS 18.3. And the problem seems to be related to the left side of the equation. I tried to call

print(self.webView.configuration.websiteDataStore.proxyConfigurations.count) 

in async block and got the same bad access error. But if stop at that line of code and call

po self.webView.configuration.websiteDataStore.proxyConfigurations 

in debugger it returns 0 elements.

Did anyone have the same problem? What may cause the exception?

Answered by DTS Engineer in 847288022

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

I found out that it was related to simulator, it was fine on real device.

I have conducted tests on this issue using Xcode versions 16.2, 16.3, and 16.4, along with simulator version 17.5 and later. I found that there are no issues when running the app on actual devices. However, we are encountering problems specifically with simulator version 17.5 and Xcode 16.3, as well as with simulator version 18.4 and Xcode 16.4. The application crashes whenever it attempts to access self.webView.configuration.websiteDataStore.proxyConfigurations. Please prioritise this matter, as it is impacting our CI and CD pipeline.

webView.configuration.websiteDataStore.proxyConfigurations = [proxyConfiguration] crashes app in ios 18
 
 
Q