0

I have a TextField in my view for search product. When touch TextField - the soft keyboard appear and write text normally. When press the return button the keyboard disappear normally in iOS 14 but when run on iOS 15 device it weirdly navigate to other view. Does anyone face that problem? My TextField code is:

TextField("Search product", text: $searchableText)
   .font(.system(size: 16))
   .padding([.top, .bottom])
   .keyboardType(.default)

and the logs are:

    2021-10-16 17:48:13.185299+0600 ExampleProject[640:155611] Unbalanced calls to begin/end 
    appearance transitions for <_TtGC7SwiftUI19UIHostingControllerV8ExampleProject8CartView_: 
    0x11d65e820>.
    2021-10-16 17:48:13.283157+0600 ExampleProject[640:155611] [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:0x2820c9a40 'BIB_Trailing_CB_Leading' H: 
    [_UIModernBarButton:0x10df9d9b0]-(6)-[_UIModernBarButton:0x10dfb50c0'Back']   
    (active)>",
    "<NSLayoutConstraint:0x2820cb200 'CB_Trailing_Trailing' _. 
    UIModernBarButton:0x10dfb50c0'Back'.trailing <= 
    _UIButtonBarButton:0x10df2cb00.trailing   (active)>",
    "<NSLayoutConstraint:0x2820d9900 'UINav_static_button_horiz_position' 
    _UIModernBarButton:0x10df9d9b0.leading == 
    UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x2820d97c0 'UINavItemContentGuide-leading' H: 
    [_UIButtonBarButton:0x10df2cb00]-(6)- 
    [UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide']   (active)>",
    "<NSLayoutConstraint:0x2820cb1b0 'UINavItemContentGuide-trailing' 
    UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide'.trailing == 
    _UINavigationBarContentView:0x10df80b80.trailing   (active)>",
    "<NSLayoutConstraint:0x2820d0550 'UIView-Encapsulated-Layout-Width' 
    _UINavigationBarContentView:0x10df80b80.width == 0   (active)>",
    "<NSLayoutConstraint:0x2820cb390 'UIView-leftMargin-guide-constraint' H:|-(8)- 
    [UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'](LTR)   (active, names: 
    '|':_UINavigationBarContentView:0x10df80b80 )>"
    )

    Will attempt to recover by breaking constraint 
    <NSLayoutConstraint:0x2820c9a40 'BIB_Trailing_CB_Leading' H: 
   [_UIModernBarButton:0x10df9d9b0]-(6)-[_UIModernBarButton:0x10dfb50c0'Back']   
   (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.
   2021-10-16 17:48:13.283738+0600 RSTWorld[640:155611] [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:0x2820c8c80 UIView:0x10df4ef40.trailing == 
    _UIBackButtonMaskView:0x10dfccf00.trailing   (active)>",
    "<NSLayoutConstraint:0x2820dadf0 'Mask_Trailing_Trailing' 
    _UIBackButtonMaskView:0x10dfccf00.trailing == _UIButtonBarButton:0x10df2cb00.trailing   
    (active)>",
    "<NSLayoutConstraint:0x2820db160 'MaskEV_Leading_BIB_Trailing' H: 
    [_UIModernBarButton:0x10df9d9b0]-(0)-[UIView:0x10df4ef40]   (active)>",
    "<NSLayoutConstraint:0x2820d9900 'UINav_static_button_horiz_position' 
    _UIModernBarButton:0x10df9d9b0.leading == 
    UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x2820d97c0 'UINavItemContentGuide-leading' H: 
    [_UIButtonBarButton:0x10df2cb00]-(6)- 
    [UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide']   (active)>",
    "<NSLayoutConstraint:0x2820cb1b0 'UINavItemContentGuide-trailing' 
    UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide'.trailing == 
    _UINavigationBarContentView:0x10df80b80.trailing   (active)>",
    "<NSLayoutConstraint:0x2820d0550 'UIView-Encapsulated-Layout-Width' 
    _UINavigationBarContentView:0x10df80b80.width == 0   (active)>",
    "<NSLayoutConstraint:0x2820cb390 'UIView-leftMargin-guide-constraint' H:|-(8)- 
    [UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'](LTR)   (active, names: 
    '|':_UINavigationBarContentView:0x10df80b80 )>"
    )

     Will attempt to recover by breaking constraint 
     <NSLayoutConstraint:0x2820c8c80 UIView:0x10df4ef40.trailing == 
     _UIBackButtonMaskView:0x10dfccf00.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.
    2021-10-16 17:48:13.284580+0600 RSTWorld[640:155611] [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:0x2820cb070 'BIB_Leading_Leading' H:|-(0)- 
    [_UIModernBarButton:0x10df9d9b0]   (active, names: '|':_UIButtonBarButton:0x10df2cb00 
     )>",
    "<NSLayoutConstraint:0x2820d9900 'UINav_static_button_horiz_position' 
    _UIModernBarButton:0x10df9d9b0.leading == 
    UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'.leading   (active)>",
    "<NSLayoutConstraint:0x2820d97c0 'UINavItemContentGuide-leading' H: 
    [_UIButtonBarButton:0x10df2cb00]-(6)- 
    [UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide']   (active)>",
    "<NSLayoutConstraint:0x2820cb1b0 'UINavItemContentGuide-trailing' 
    UILayoutGuide:0x283a988c0'UINavigationBarItemContentLayoutGuide'.trailing == 
    _UINavigationBarContentView:0x10df80b80.trailing   (active)>",
    "<NSLayoutConstraint:0x2820d0550 'UIView-Encapsulated-Layout-Width' 
    _UINavigationBarContentView:0x10df80b80.width == 0   (active)>",
    "<NSLayoutConstraint:0x2820cb390 'UIView-leftMargin-guide-constraint' H:|-(8)- 
    [UILayoutGuide:0x283a9b020'UIViewLayoutMarginsGuide'](LTR)   (active, names: 
    '|':_UINavigationBarContentView:0x10df80b80 )>"
    )

    Will attempt to recover by breaking constraint 
    <NSLayoutConstraint:0x2820cb070 'BIB_Leading_Leading' H:|-(0)- 
    [_UIModernBarButton:0x10df9d9b0]   (active, names: '|':_UIButtonBarButton:0x10df2cb00 
     )>

    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.
Mahmudur Rahman
  • 638
  • 9
  • 25

0 Answers0