Input form error

I’m using Phonegap / Cordova, when I enter a form with inputs, when I click on an input I receive my error message in the xcode console:

2018-04-03 07:56:39.611014+0200 appinput[11339:61445609] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/toni/Library/Developer/CoreSimulator/Devices/BB636549-A965-42FE-8DFB-76FB84BB433D/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-04-03 07:56:39.612929+0200 appinput[11339:61445609] [MC] Reading from private effective user settings.
2018-04-03 07:56:39.670170+0200 appinput[11339:61445609] API error: <_UIKBCompatInputView: 0x7ff438532ba0; frame = (0 0; 0 0); layer = <CALayer: 0x600000039460>> returned 0 width, assuming UIViewNoIntrinsicMetric
2018-04-03 07:56:39.670438+0200 appinput[11339:61445609] API error: <_UIKBCompatInputView: 0x7ff438532ba0; frame = (0 0; 0 0); layer = <CALayer: 0x600000039460>> returned 0 width, assuming UIViewNoIntrinsicMetric
2018-04-03 07:56:39.729863+0200 appinput[11339:61445609] [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.
(Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
“<NSAutoresizingMaskLayoutConstraint:0x604000480c80 h=-&- v=-&- _UIToolbarContentView:0x7ff43872dd30.width == UIToolbar:0x7ff43872d6c0.width (active)>”,
“<NSLayoutConstraint:0x604000290770 H:|-(0)-[_UIButtonBarStackView:0x7ff43872f2c0] (active, names: ‘|’:_UIToolbarContentView:0x7ff43872dd30 )>”,
“<NSLayoutConstraint:0x6040002907c0 _UIButtonBarStackView:0x7ff43872f2c0.trailing == _UIToolbarContentView:0x7ff43872dd30.trailing + 8 (active)>”,
“<NSLayoutConstraint:0x60000029dc40 H:|-(0)-[_UIModernBarButton:0x7ff438622910] (active, names: ‘|’:_UIButtonBarButton:0x7ff438621820 )>”,
“<NSLayoutConstraint:0x60000029dc90 H:[_UIModernBarButton:0x7ff438622910]-(>=8)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438621820 )>”,
“<NSLayoutConstraint:0x60400029fb80 H:|-(>=5)-[_UIModernBarButton:0x7ff4384234d0] (active, names: ‘|’:_UIButtonBarButton:0x7ff438422e60 )>”,
“<NSLayoutConstraint:0x60400029fbd0 H:[_UIModernBarButton:0x7ff4384234d0]-(>=5)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438422e60 )>”,
“<NSLayoutConstraint:0x60000029ebe0 H:|-(8)-[_UIModernBarButton:0x7ff438423ac0’Done’] (active, names: ‘|’:_UIButtonBarButton:0x7ff438623930 )>”,
“<NSLayoutConstraint:0x60000029ec30 H:[_UIModernBarButton:0x7ff438423ac0’Done’]-(0)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438623930 )>”,
“<NSLayoutConstraint:0x6040004806e0 ‘UISV-canvas-connection’ UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’.leading == _UIButtonBarButton:0x7ff438621820.leading (active)>”,
“<NSLayoutConstraint:0x6040004807d0 ‘UISV-canvas-connection’ UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’.trailing == _UIButtonBarButton:0x7ff438623930.trailing (active)>”,
“<NSLayoutConstraint:0x60400029a220 ‘UISV-spacing’ H:[_UIButtonBarButton:0x7ff438621820]-(0)-[UIView:0x7ff438422c80] (active)>”,
“<NSLayoutConstraint:0x60400028de30 ‘UISV-spacing’ H:[UIView:0x7ff438422c80]-(0)-[_UIButtonBarButton:0x7ff438422e60] (active)>”,
“<NSLayoutConstraint:0x60400029f770 ‘UISV-spacing’ H:[_UIButtonBarButton:0x7ff438422e60]-(0)-[UIView:0x7ff438623750] (active)>”,
“<NSLayoutConstraint:0x60400029f7c0 ‘UISV-spacing’ H:[UIView:0x7ff438623750]-(0)-[_UIButtonBarButton:0x7ff438623930] (active)>”,
“<NSLayoutConstraint:0x604000480d70 ‘UIView-Encapsulated-Layout-Width’ UIToolbar:0x7ff43872d6c0.width == 0 (active)>”,
“<NSLayoutConstraint:0x600000293a60 ‘UIView-leftMargin-guide-constraint’ H:|-(0)-UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’ (active, names: ‘|’:_UIButtonBarStackView:0x7ff43872f2c0 )>”,
“<NSLayoutConstraint:0x600000293ba0 ‘UIView-rightMargin-guide-constraint’ H:[UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’]-(0)-|(LTR) (active, names: ‘|’:_UIButtonBarStackView:0x7ff43872f2c0 )>”
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000029dc90 H:[_UIModernBarButton:0x7ff438622910]-(>=8)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438621820 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2018-04-03 07:56:39.732082+0200 appinput[11339:61445609] [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.
(Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
“<NSAutoresizingMaskLayoutConstraint:0x604000480c80 h=-&- v=-&- _UIToolbarContentView:0x7ff43872dd30.width == UIToolbar:0x7ff43872d6c0.width (active)>”,
“<NSLayoutConstraint:0x604000290770 H:|-(0)-[_UIButtonBarStackView:0x7ff43872f2c0] (active, names: ‘|’:_UIToolbarContentView:0x7ff43872dd30 )>”,
“<NSLayoutConstraint:0x6040002907c0 _UIButtonBarStackView:0x7ff43872f2c0.trailing == _UIToolbarContentView:0x7ff43872dd30.trailing + 8 (active)>”,
“<NSLayoutConstraint:0x60400029fb80 H:|-(>=5)-[_UIModernBarButton:0x7ff4384234d0] (active, names: ‘|’:_UIButtonBarButton:0x7ff438422e60 )>”,
“<NSLayoutConstraint:0x60400029fbd0 H:[_UIModernBarButton:0x7ff4384234d0]-(>=5)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438422e60 )>”,
“<NSLayoutConstraint:0x60000029ebe0 H:|-(8)-[_UIModernBarButton:0x7ff438423ac0’Done’] (active, names: ‘|’:_UIButtonBarButton:0x7ff438623930 )>”,
“<NSLayoutConstraint:0x60000029ec30 H:[_UIModernBarButton:0x7ff438423ac0’Done’]-(0)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438623930 )>”,
“<NSLayoutConstraint:0x6040004806e0 ‘UISV-canvas-connection’ UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’.leading == _UIButtonBarButton:0x7ff438621820.leading (active)>”,
“<NSLayoutConstraint:0x6040004807d0 ‘UISV-canvas-connection’ UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’.trailing == _UIButtonBarButton:0x7ff438623930.trailing (active)>”,
“<NSLayoutConstraint:0x60400029a220 ‘UISV-spacing’ H:[_UIButtonBarButton:0x7ff438621820]-(0)-[UIView:0x7ff438422c80] (active)>”,
“<NSLayoutConstraint:0x60400028de30 ‘UISV-spacing’ H:[UIView:0x7ff438422c80]-(0)-[_UIButtonBarButton:0x7ff438422e60] (active)>”,
“<NSLayoutConstraint:0x60400029f770 ‘UISV-spacing’ H:[_UIButtonBarButton:0x7ff438422e60]-(0)-[UIView:0x7ff438623750] (active)>”,
“<NSLayoutConstraint:0x60400029f7c0 ‘UISV-spacing’ H:[UIView:0x7ff438623750]-(0)-[_UIButtonBarButton:0x7ff438623930] (active)>”,
“<NSLayoutConstraint:0x604000480d70 ‘UIView-Encapsulated-Layout-Width’ UIToolbar:0x7ff43872d6c0.width == 0 (active)>”,
“<NSLayoutConstraint:0x600000293a60 ‘UIView-leftMargin-guide-constraint’ H:|-(0)-UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’ (active, names: ‘|’:_UIButtonBarStackView:0x7ff43872f2c0 )>”,
“<NSLayoutConstraint:0x600000293ba0 ‘UIView-rightMargin-guide-constraint’ H:[UILayoutGuide:0x6000001bc8c0’UIViewLayoutMarginsGuide’]-(0)-|(LTR) (active, names: ‘|’:_UIButtonBarStackView:0x7ff43872f2c0 )>”
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60400029fbd0 H:[_UIModernBarButton:0x7ff4384234d0]-(>=5)-| (active, names: ‘|’:_UIButtonBarButton:0x7ff438422e60 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

In the simulator, the error that appears is that the whole view is uploaded and the title bar is lost, I attach images to make it clearer:

thanks you

Add Cordova-plugin-keyboard to your project

1 Like

thank you very much, it has worked, this creates another problem, it does not scroll the entry if I click on a field at the bottom of the screen, the keyboard covers it.

Try changing the scrollable property
https://www.npmjs.com/package/cordova-plugin-keyboard#keyboarddisablescrollinginshrinkview

Keyboard.disableScrollingInShrinkView(false);

Or, animate your view to a certain position when a user focuses your field.

There is also scrollIntoViewOnFocus parameter that can be enabled http://framework7.io/docs/inputs.html#input-app-parameters

yes, i have

Keyboard.shrinkView(true);
Keyboard.disableScrollingInShrinkView(false);

and

input: {
scrollIntoViewOnFocus: true,
scrollIntoViewCentered: true,
},

but in iOS don’t work scroll

on Android, this has caused the failure:

$$1$1(window).once(‘resize’, function () {})

I have removed it and it has been done, but in iOS it still does not