Running `[[UIApplication sharedApplication] openURL:url` into a concurrent thread?

I'm currently working on a feature (cross macOS iOS) that involves the openURL API.

  • [[UIApplication sharedApplication] openURL:url for iOS
  • [[NSWorkspace sharedWorkspace] openURL:url for macOS

I used the signature for both APIs that affords me the completionHandler callback.

Documentations point out that the iOS version callback run on the main thread and the other one on a concurrent one.

I don't know if some of you know why we have this distinction. I found a piece of code from the Chrome codebase, where dispatch_async is used for the older versions of iOS: https://cs.github.com/hbtlabs/chromium-white-flash-fix/blob/e890904e9fc7a18c813772ffcbbdef9c3cf6af4d/ios/chrome/browser/open_url_util.mm?q=%5B%5BUIApplication+sharedApplication%5D+openURL%3Aurl#L13

Should I run the callback into another thread with dispatch_async as I see there? https://cs.github.com/microsoft/WinObjC/blob/94f6b5bfdc09d945e30607b56124b6f94a5b9d7b/Frameworks/SafariServices/SFSafariWebViewController.mm?q=%5B%5BUIApplication+sharedApplication%5D+openURL%3Aurl#L99-L109

Thanks ^^

Running `[[UIApplication sharedApplication] openURL:url` into a concurrent thread?
 
 
Q