Been encountering this error a lot in my OS X using swift:
\"This application is modifying the autolayout engine from a background thread, which can
The "this application is modifying the autolayout engine from a background thread" error is logged in the console long after the actual problem occured, so debugging this can be hard without using a breakpoint.
I used @markussvensson's answer to detect my problem and found it using this Symbolic Breakpoint (Debug > Breakpoints > Create Symbolic Breakpoint):
[UIView layoutIfNeeded] or [UIView updateConstraintsIfNeeded]!(BOOL)[NSThread isMainThread]Build and run the app on the emulator and replicate the steps that lead to the error message being thrown (the app will be slower than usual!). Xcode will then stop the app and mark the line of code (e.g. the call of a func) that's accessing the UI from a background thread.