1

I am working in a team. When someone develops new UI using AutoLayout, they often test it on simulator/device and forget about the console. After months of such behavior debug console is flooded with unsatisfiable constraints logs and will attempt to recover by breaking X. While we approached this issue and fixed them(which was tiring and boring), I really want to prevent these errors from growing in future and throw an exception once such message appears in the console. What is the best way of implementing this?

AtulParmar
  • 4,358
  • 1
  • 24
  • 45
efimovdk
  • 368
  • 4
  • 16

1 Answers1

2

Add a symbolic breakpoint on UIViewAlertForUnsatisfiableConstraints.

Now if you get a constraint conflict, at least the app will stop and you’ll notice.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Thanks, matt! I am afraid that breakpoints aren't passed alongside with .xcworkspace when you use version control systems and so when new developers join the team - I will have to remind myself about reminding them to set that particular breakpoint, which I will be definitely forgetting sometimes. Is there any other way of doing this? – efimovdk May 22 '19 at 18:35
  • Better programming practice from the start? I mean really, not knowing you’ve got auto layout issues is just silly. – matt May 22 '19 at 22:08