How to delete the warning 'This method should not be called on the main thread as it may lead to UI unresponsiveness.' shown in xCode14

@autoreleasepool {

        return UIApplicationMain(argc, argv, nil, NSStringFromClass([PostAppDelegate class]));

    }

Set break points in PostAppDelegate to see what might be causing the warning.

This warning is shown on editor view of xCode, not when I run the app.

This warning is shown on editor view of Xcode

Please post a screen shot of the state that you land it.

ps Quinn’s Top Ten DevForums Tips has some tips on doing that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I have the same problem. It occurs at the following command line.

trustCert = SecTrustEvaluateWithError(serverTrust, nil);

How can I solve this.

Same purple warning in Xcode 14 here. "This method should not be called on the main thread as it may lead to UI unresponsiveness." In my case I've traced it to a WKWebView -> loadRequest:, i.e. called from my main ViewController's -> viewDidLoad: I load a web view at app startup, as after launch/splash screen it's the first view user will see. I'm careful about accounting for network issues and will timeout (or not even try loading), display an alternative screen, etc. if there are network issues. I'm going to assume someone on the Xcode team chose to add this warning in the event a developer doesn't account for slow loading or not loading at all an initial wkwebview when the app first launches? Any other theories? Is it safe to ignore the warning?

Please see the information provided in another thread.

How to delete the warning 'This method should not be called on the main thread as it may lead to UI unresponsiveness.' shown in xCode14
 
 
Q