This method should not be called on the main thread as it may lead to UI unresponsiveness.

Hello all!

Seems like this has been an issue for others but I'm looking for a more direct response if possible. Im utilizing WebKit and WKWebView to create a link tree type app. I'm getting the message listed as the title on my @main. It seems like the issue could be resolved with preloading the urls but I'm not sure exactly if this is practical for two urls.

Any help is greatly appreciated!

-Dre

This seems to be a warning coming from WebKit itself, happens to us when we tried to load a web view:

webView.load(request) on the main thread

and immediately we are getting this warning: This method should not be called on the main thread as it may lead to UI unresponsiveness.

with this stack trace:

#0	0x0000000000000000 in SecTrustEvaluateIfNecessary ()
#1	0x0000000000000000 in SecTrustGetCertificateCount ()
#2	0x0000000000000000 in WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate() const ()
#3	0x0000000000000000 in WebKit::WebPageProxy::didCommitLoadForFrame(WTF::ObjectIdentifier<WebCore::FrameIdentifierType>, WebKit::FrameInfoData&&, WebCore::ResourceRequest&&, unsigned long long, WTF::String const&, bool, WebCore::FrameLoadType, WebCore::CertificateInfo const&, bool, bool, std::__1::optional<WebCore::HasInsecureContent>, WebCore::MouseEventPolicy, WebKit::UserData const&) ()
#4	0x0000000000000000 in WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) ()
#5	0x0000000000000000 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) ()
#6	0x0000000000000000 in WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) ()
#7	0x0000000000000000 in IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) ()
#8	0x0000000000000000 in IPC::Connection::dispatchIncomingMessages() ()
#9	0x0000000000000000 in WTF::RunLoop::performWork() ()
#10	0x0000000000000000 in WTF::RunLoop::performWork(void*) ()
#11	0x0000000000000000 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#12	0x0000000000000000 in __CFRunLoopDoSource0 ()
#13	0x0000000000000000 in __CFRunLoopDoSources0 ()
#14	0x0000000000000000 in __CFRunLoopRun ()
#15	0x0000000000000000 in CFRunLoopRunSpecific ()
#16	0x0000000000000000 in GSEventRunModal ()
#17	0x0000000000000000 in -[UIApplication _run] ()
#18	0x0000000000000000 in UIApplicationMain ()
#19	0x0000000000000000 in main at /Users/artium/workspace/Katalyst/iOS/KatalystFitness/AppDelegate.swift:5

Xcode Version 14.1 (14B47b) iOS 16.1 Simulator

Same here! Do we need to worry about? I mean, as on Xcode 13 this warning not happen

This method should not be called on the main thread as it may lead to UI unresponsiveness.
 
 
Q