Erik icon indicating copy to clipboard operation
Erik copied to clipboard

"WKWebView.navigationDelegate must be used from main thread only" error when running tests

Open n2nco opened this issue 5 years ago • 6 comments

image

n2nco avatar Feb 08 '20 16:02 n2nco

+1

pvn-anh-pham avatar May 04 '20 18:05 pvn-anh-pham

You can comment and PR, it's just an assert

phimage avatar May 11 '20 18:05 phimage

@phimage what do you mean?

jakejcheng avatar May 25 '20 18:05 jakejcheng

assert: https://developer.apple.com/documentation/swift/1541112-assert

phimage avatar May 25 '20 20:05 phimage

lol I know what assert is but im just not familiar with the whole threading stuff. So you mean that line is not needed?

jakejcheng avatar May 26 '20 05:05 jakejcheng

no you must learn also about assert assert will not be executed with normal compilation flag (of release configuration) So this code is only in dev mode, and yes it could be commented..

Now if you want to know about threading stuff, just copy past the error message in short graphical element must be acceded from main thread only (to avoid many concurent issue, such as draw concurently)

phimage avatar May 27 '20 18:05 phimage