0

I just created a vanilla brand new SwiftUI project with the most basic possible view for a textfields with not styling whatsoever:

struct ContentView: View {
    @State private var email = ""
    @State private var password = ""
    
    var body: some View {
        VStack {
            TextField("Email", text: $email)
            SecureField("Password", text: $password)
        }
    }

}

And I am getting this very annoying and frustrating error. Please I am aware that everything still works despite the warning, but I want to get rid of this no matter what. How to do that?

2023-04-27 09:43:13.444617+0400 Test[16580:1186362] [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:0x282228320 'accessoryView.bottom' _UIRemoteKeyboardPlaceholderView:0x11d1105c0.bottom == _UIKBCompatInputView:0x11be0f3b0.top   (active)>",
    "<NSLayoutConstraint:0x282229900 'assistantHeight' SystemInputAssistantView.height == 45   (active, names: SystemInputAssistantView:0x11d205d00 )>",
    "<NSLayoutConstraint:0x2822216d0 'assistantView.bottom' SystemInputAssistantView.bottom == _UIKBCompatInputView:0x11be0f3b0.top   (active, names: SystemInputAssistantView:0x11d205d00 )>",
    "<NSLayoutConstraint:0x282221680 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x11d1105c0]-(0)-[SystemInputAssistantView]   (active, names: SystemInputAssistantView:0x11d205d00 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x282221680 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x11d1105c0]-(0)-[SystemInputAssistantView]   (active, names: SystemInputAssistantView:0x11d205d00 )>

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.

Please note, no styling whatsoever anywhere added. This is brand new vanilla project. How to get rid of this error by any means necessary?

Pro Girl
  • 762
  • 7
  • 21
  • 1
    You can likely safely ignore this — trying to rid the Xcode console of all noise is an uphill battle – jnpdx Apr 27 '23 at 06:10
  • @jnpdx thanks for reply. Is there any way to ignore a specific error from the Xcode console, or do you mean like to just ignore and move on? Because the reason it's annoying is that I don't want to miss other important warnings or look thought that every time. – Pro Girl Apr 27 '23 at 06:57
  • You can add UIViewAlertForUnsatisfiableConstraints symbolic breakpoint with action to catch this error in the debugger. – Faaiz Daag Apr 27 '23 at 10:07
  • @FAAIZDAAG thanks for reply. Of course, yes, It's the first thing I did, but it's basically returns Assembly Code and nothing else. – Pro Girl Apr 27 '23 at 10:23

0 Answers0