Disable autolayout constraint error messages in debug console output in Xcode

Swift 4.0 & Swift 5.0 Solution:

// Hide Autolayout Warning
UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")

Swift 3.0 Solution:

// Hide Autolayout Warning
UserDefaults.standard.setValue(false, forKey:"_UIConstraintBasedLayoutLogUnsatisfiable")

Did some decompiling and there's actually a way:

for Swift 5

UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")

Objective-C

[[NSUserDefaults standardUserDefaults] setValue:@(NO) forKey:@"_UIConstraintBasedLayoutLogUnsatisfiable"];

Now you'll only get notified that "_UIConstraintBasedLayoutLogUnsatisfiable is OFF".

Obligatory reminder for anyone reading this: this should be last resort, for tips on debugging and fixing constraint issues see WWDC's "Mysteries of Auto Layout" sessions: part 1 and part 2.


One more option is to temporarily put -_UIConstraintBasedLayoutLogUnsatisfiable NO (notice the dash) into Arguments Passed On Launch menu, under the Product -> Scheme -> Edit Scheme... -> Run -> Arguments tab (you can also open this menu by pressing ++<), like this:

enter image description here