"UI unresponsiveness" warning on @main

  • ">

  • Sama here, Xcode 14.2.

Add a Comment

Apple Recommended

  • I've replied back below. please note

  • I updated to OS 13.0.1 and Xcode to 14.1. My app now reports this same error "This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first." and traces it to this bit of code:

    if CLLocationManager.locationServicesEnabled(). So, I implemented the suggested fix, but the complier says that authorizationStatus was deprecated in iOS 14.0

  • this is not helpful at all

Add a Comment

Replies

I get the same warning in XCode14 Beta 5 in my objective C main() when it calls UIApplicationMain(argc, argv, nil, nil); (See below)

I use a WKWebView to allow user to login.

For me it seems to happen if I display a WkWebView when I start my Aop. If I run and don't need to display the WkWebView (Ie I already have login details) then I don't seem to get the warning...

int main(int argc, char *argv[]) {

    @autoreleasepool {

        int retVal = UIApplicationMain(argc, argv, nil, nil);

        return retVal;

    }

}

All a bit worrying but I have no clue what it means.

Happening to me too. Someone please solve this

I also encountered the same phenomenon.

However, depending on the loading URL, this message may or may not be displayed.

I'm not quite sure what the difference is.

When this message was not displayed, the following message was displayed.

Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

Xcode Version 14.0 beta 6 (14A5294g)

iOS16.0 beta 8

iPhone SE 2generation

  • I'm seeing the same think in WKWebView, every time I show WKWebView it prints out the following error message multiple times: "This method should not be called on the main thread as it may lead to UI unresponsiveness."

    I also see that navigation to different web pages in WKWebView seems to lag a bit, like something is blocking the main thread. Haven't been able to figure out the cause yet.

    Anyone have any insight?

  • system console log: [pageProxyID=69, webPageID=70, PID=1923] WebPageProxy::didCommitLoadForFrame: frameID=3, isMainFrame=1 This method should not be called on the main thread as it may lead to UI unresponsiveness.

    When the app uses wkwebview to load a webpage for the first time, Web content displays only half the screen, It looks like the wkwebview is hang. Then all pages using wkwebview will have the above situation.

  • Same here! iOS16 release, WKWeb content could not be displayed or half screened

Add a Comment

Any solutions on this? Someone please solve this.

Xcode 14 Beta 5 iOS 16.0

Same here!

Same here on Xcode 14 beta 6 / iOS 16.0 beta 8. Would love to know if any updates.

same for me a warning error : This method should not be called on the main thread as it may lead to UI unresponsiveness.

I'm experiencing the same thing with WkWebView (not in SwiftUI).

Xcode 14.0 beta 6 (14A5294g)

  • Following up on my original post.. I updated to Xcode 14 RC but I'm still seeing the same issue: "This method should not be called on the main thread as it may lead to UI unresponsiveness" warning.

    I believe it is happening when WkWebView.load(URLRequest) is called. If I comment out the particular load() call, the warning isn't displayed.

Add a Comment

Same here with UIKit, AppDelegate and WKWebView. Points to class AppDelegate in the warning... no other information.

If you are continuing to see this when using Xcode 14 Release Candidate running an app on iOS 16 Release Candidate, please provide detailed specifics in a bug report., and then post the FB number here.

It was the same on iOS16RC&xcode14RC. Posted: FB 11480364

Yep WkWebView.load(URLRequest) in a UIKit app causes this issue for me in the Xcode 14 RC.

  • I have the same problem with the code. Xcode ver. 14.2

Add a Comment

Same error using Xcode Version 14.0 (14A309), iOS16 on iPad. Using WkWebView with SwiftUI.

Same error for me happening

Add a Comment

Facing the same issue, any solution or workaround?

  • Same issue on the AppDelegate

  • exactly the same...

  • Same issue... but the app works fine...

Add a Comment