I need help in resolving these warnings after I migrated to Xcode 11. The warnings are as follows:
Unsupported use of UIKit API off the main thread: UIAccessibilityIsGuidedAccessEnabled() Unsupported use of UIKit API off the main thread: UIAccessibilityIsAssistiveTouchRunning() Unsupported use of UIKit API off the main thread: UIAccessibilityIsGuidedAccessEnabled() Unsupported use of UIKit API off the main thread: UIAccessibilityIsAssistiveTouchRunning() Unsupported use of UIKit API off the main thread: UIAccessibilityIsGuidedAccessEnabled()
You're modifying UI off the main thread. Wrap the calls to the listed methods in your code in
DispatchQueue.main
blocks:If you want to learn more about
DispatchQueue.main
I wrote a blog post about it recently: link