I'm adding one UIBarButtonItem with a custom view. The custom view uses autolayout to layout its inner components. Is this supported in iOS 13? This issue does not happen when the same code is run against an iOS 12 device. Adding just one UIBarButtonItem which has a custom view causes this to happen. None of the UIViews listed in the conflict below are mine (e.g: _UIToolbarContentView) and they're clearly private UIView classes.
I'm not even sure how to debug this issue. I've set the UIToolbar's translatesAutoresizingMaskIntoConstraints to NO, but this issue still happens.
Setting a breakpoint on UIViewAlertForUnsatisfiableConstraints doesn't help because the stack trace doesn't give any valuable clues as it's all iOS private classes
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
"<NSAutoresizingMaskLayoutConstraint:0x2815ebe30 h=--& v=--& _UIToolbarContentView:0x100d6f8e0.width == 0 (active)>",
"<NSLayoutConstraint:0x2815ea120 H:|-(0)-[_UIButtonBarStackView:0x100d31080] (active, names: '|':_UIToolbarContentView:0x100d6f8e0 )>",
"<NSLayoutConstraint:0x2815ea170 _UIButtonBarStackView:0x100d31080.trailing == _UIToolbarContentView:0x100d6f8e0.trailing - 16 (active)>"
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2815ea170 _UIButtonBarStackView:0x100d31080.trailing == _UIToolbarContentView:0x100d6f8e0.trailing - 16 (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.