Post

Replies

Boosts

Views

Activity

http://a/%%30%30 crashes WebKit
My browser based on WebKit crashes when I try to load http://a/%%30%30 with exception "Unexpectedly found nil while unwrapping an Optional value". @IBOutlet weak var webView: WKWebView! webView.uiDelegate = self webView.navigationDelegate = self webView.customUserAgent = Browser.UserAgent() let config = webView.configuration config.applicationNameForUserAgent = Browser.name config.preferences.javaScriptEnabled = true webView.scrollView.delegate = self webView.scrollView.isScrollEnabled = true webView.scrollView.keyboardDismissMode = .onDrag The crash actually occurs when I return the URL value: if fullURL.contains("http://") || fullURL.contains("https://") { return URL(string: query)! } And then the webpage is loaded: webView.load(url) I have removed the "!" from the return function of the URL and I am required to provide a default value or force-unwrap, which leads to a crash. Is this a problem with my code or with WebKit?
0
0
513
Nov ’21
"Preparing the watch for development via iPhone" re-occurs too many times
Every time I build my app, at the first compile since Xcode launched, I see this screen, and Xcode is stuck here for any time between 5 and 30 minutes, and I'm not even developing an Apple Watch app: I have seen similar articles, but with no real resolution. After googling for a few minutes, this should happen when the OS is updated, but it happens literally when compiling any app for the first time since opening Xcode, and it also wastes a hell lot of time, because I cannot even edit code while waiting. Any tips?
1
0
1.1k
Apr ’22