I’m running Ionic 3 on iPhone 7 plus iOS 11, and have a few input fields. When I tap into any of the input fields, my Xcode console outputs this error:
API error: <_UIKBCompatInputView: 0x155eac820; frame = (0 0; 0 0); layer = <CALayer: 0x1c003a6c0>> returned 0 width, assuming UIViewNoIntrinsicMetric
Sometime the app runs ok and sometimes it freezes for 10 seconds and I’m unable to click anywhere as it becomes unresponsive. Any ideas what might be causing this behaviour?
It’s simple, just go to Ionic and check instructions. It’s literally 2 CLI commands. But, if you use some special functionality (like phone storage), you’ll need to slightly update your code. It’s all there in the instructions, and even if you just upgrade, you’ll get a few errors during build which will show u which code to update.
Yes, I performed the step on that doc, still got the errors.Then I created a new ionic project, moved my /src to the new project, added several packages by hand to the new project I thought that fixed for a while until:
API error: <_UIKBCompatInputView: 0x137f43b50; frame = (0 0; 0 0); layer = <CALayer: 0x1d022ba20>> returned 0 width, assuming UIViewNoIntrinsicMetric
[Snapshotting] Snapshotting a view (0x137f48fa0, UIInputSetHostView) that has not been rendered at least once requires afterScreenUpdates:YES.
I did exactly the same as @jbctw and I have the same error. It occurs when I show the keyboard for the first time in my app. Either touching an input or using setFocus(). My app was ready to release :(. How to solve this? Thanks for helping.
I experienced the same thing and it took me way too long to fix it. I was able to fix the issue by delaying execution of the js in my first controller until after the device was ready. i.e.
$ionicPlatform.ready(function(){init();});
My theory is that updating the DOM by binding a value to it prior to the device being ready was causing the error. It makes some sense, as if the device isn’t ready and returning a width of 0, you aren’t ready to render the DOM and doing so could cause an error. This makes even more sense if you are using the viewport meta tag and setting width to device-width as most people added to accommodate the iPhone X.
I’m facing the same problem since this morning. 2 days ago, my app worked like a charm (ios 12.0.0, ionic 3), and this morning i receive ios 12.0.1 update and since then, each time i show the keyboard, the app is freezing and the console throw me this error :
API error: <_UIKBCompatInputView: 0x1066348d0; frame = (0 0; 0 0); layer = <CALayer: 0x281e51880>> returned 0 width, assuming UIViewNoIntrinsicMetric
i already use platform.ready().then(...) in this, not solve the issue…