WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

SOLVED: Console warning output for Project 4 (BetterRest)

Forums > 100 Days of SwiftUI

Curious to know if anyone else has encountered/understands this warning (the app still runs fine): when running the final product (and I've run Paul's code from the GitHub repository), the console produces the following message:

2022-01-16 18:01:05.816275-0500 BetterRest[10866:253030] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (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. ( "<NSLayoutConstraint:0x600002750ff0 UIView:0x7fa6d205e080.trailing == _UIBackButtonMaskView:0x7fa6d20496b0.trailing (active)>", "<NSLayoutConstraint:0x6000027523a0 'Mask_Trailing_Trailing' _UIBackButtonMaskView:0x7fa6d20496b0.trailing == BackButton.trailing (active, names: BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x600002752210 'MaskEV_Leading_BIB_Trailing' H:[_UIModernBarButton:0x7fa6d202ce50]-(0)-[UIView:0x7fa6d205e080] (active)>", "<NSLayoutConstraint:0x6000027566c0 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa6d202ce50.leading == UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide'.leading (active)>", "<NSLayoutConstraint:0x600002756300 'UINavItemContentGuide-leading' H:[BackButton]-(6)-[UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'] (active, names: BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x600002753d40 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa6d2050700.trailing (active)>", "<NSLayoutConstraint:0x60000274cfa0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa6d2050700.width == 0 (active)>", "<NSLayoutConstraint:0x600002753980 'UIView-leftMargin-guide-constraint' H:|-(8)-UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide' (active, names: '|':_UINavigationBarContentView:0x7fa6d2050700 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002750ff0 UIView:0x7fa6d205e080.trailing == _UIBackButtonMaskView:0x7fa6d20496b0.trailing (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. 2022-01-16 18:01:05.817469-0500 BetterRest[10866:253030] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (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. ( "<NSLayoutConstraint:0x600002751b30 'BIB_Leading_Leading' H:|-(0)-[_UIModernBarButton:0x7fa6d202ce50] (active, names: BackButton:0x7fa6d2086e20, '|':BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x6000027566c0 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa6d202ce50.leading == UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide'.leading (active)>", "<NSLayoutConstraint:0x600002756300 'UINavItemContentGuide-leading' H:[BackButton]-(6)-[UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'] (active, names: BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x600002753d40 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa6d2050700.trailing (active)>", "<NSLayoutConstraint:0x60000274cfa0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa6d2050700.width == 0 (active)>", "<NSLayoutConstraint:0x600002753980 'UIView-leftMargin-guide-constraint' H:|-(8)-UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide' (active, names: '|':_UINavigationBarContentView:0x7fa6d2050700 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002751b30 'BIB_Leading_Leading' H:|-(0)-[_UIModernBarButton:0x7fa6d202ce50] (active, names: BackButton:0x7fa6d2086e20, '|':BackButton:0x7fa6d2086e20 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. 2022-01-16 18:01:05.818098-0500 BetterRest[10866:253030] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (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. ( "<NSLayoutConstraint:0x600002751b80 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x7fa6d202ce50]-(6)-[_UIModernBarButton:0x7fa6d2013070'BetterRest'] (active)>", "<NSLayoutConstraint:0x600002751bd0 'CB_Trailing_Trailing' _UIModernBarButton:0x7fa6d2013070'BetterRest'.trailing <= BackButton.trailing (active, names: BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x6000027566c0 'UINav_static_button_horiz_position' _UIModernBarButton:0x7fa6d202ce50.leading == UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide'.leading (active)>", "<NSLayoutConstraint:0x600002756300 'UINavItemContentGuide-leading' H:[BackButton]-(6)-[UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'] (active, names: BackButton:0x7fa6d2086e20 )>", "<NSLayoutConstraint:0x600002753d40 'UINavItemContentGuide-trailing' UILayoutGuide:0x600003d69b20'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x7fa6d2050700.trailing (active)>", "<NSLayoutConstraint:0x60000274cfa0 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x7fa6d2050700.width == 0 (active)>", "<NSLayoutConstraint:0x600002753980 'UIView-leftMargin-guide-constraint' H:|-(8)-UILayoutGuide:0x600003d69c00'UIViewLayoutMarginsGuide' (active, names: '|':_UINavigationBarContentView:0x7fa6d2050700 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600002751b80 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x7fa6d202ce50]-(6)-[_UIModernBarButton:0x7fa6d2013070'BetterRest'] (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. 2022-01-16 18:01:06.057186-0500 BetterRest[10866:253030] [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view. We're considering the collapse unintentional and using standard height instead. Cell: <SwiftUI.ListTableViewCell: 0x7fa6d30b1400; baseClass = UITableViewCell; frame = (0 66.6667; 350 64.3333); autoresize = W; layer = <CALayer: 0x600000404ea0>>

1      

Please read this On Log Noise

1      

Hacking with Swift is sponsored by Emerge

SPONSORED Optimize your app’s startup time, binary size, and overall performance using Emerge’s advanced app optimization and monitoring tools. Reliably measure app size, speed up your app's startup time with Emerge's Launch Booster, and much more. Emerge is actively used by many of the top mobile development teams in the world.

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.