efimovdk
efimovdk

Reputation: 368

How can I make AutoLayout crash my app when it logs unsatisfiable constraints in debug console?

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?

Upvotes: 1

Views: 225

Answers (1)

matt
matt

Reputation: 535230

Add a symbolic breakpoint on UIViewAlertForUnsatisfiableConstraints.

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

Upvotes: 2

Related Questions