iOS Question Clicking done after input causes fatal error

Osp

Member
Licensed User
Longtime User
I am using IUI8 with WKWebView to translate an Android App to IOS, testing currently within B4i Bridge on an Iphone SE.
Any native keyboard inputs provoke the below error when the keyboard is opened. Someone on stackoverflow posted the only solution would be to upgrade to mkwebview. Anyone an idea if there is any solution preventing from this? Due to the error probably the keyboard's "done" doesn't work. The webview though can still react on it's own "ok" button and get the input from the element.

API error: <_UIKBCompatInputView: 0x14fd379d0; frame = (0 0; 0 0); layer = <CALayer: 0x1c003b780>> returned 0 width, assuming UIViewNoIntrinsicMetric

Does anyone know how to make the native "done" work?
 
Last edited:

Osp

Member
Licensed User
Longtime User
Hi, Erel - thanks for looking into it. Will try to make a small project just with an input field in a wkwebview and upload it later.
 
Upvote 0

Osp

Member
Licensed User
Longtime User
Hi, what is the upload limit? The webwiev needs some assets and even stripping a lot doesn't allow me to upload :( (last try approx 700kb - I wanted to at least use the same framework as the original)
 
Upvote 0

Osp

Member
Licensed User
Longtime User
assets from cdn works :) hope it's under same "conditions" like original to reproduce the error. Just click on "login" on the screen, a popup should get into sight and provoke the error?
 

Attachments

  • inptexample.zip
    160.3 KB · Views: 221
Upvote 0

Osp

Member
Licensed User
Longtime User
It should work though with files missing. The only one that counts really is the index.html - it will load assets for Onsen.ui from a cdn in the stripped version and in Chrome the file opens and runs without issue so it should open wrapped as a iphone app I would assume? Only file to load from the app (index.html) is included and most of the rest loads from online. The missing images should not prevent from testing?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've ran your program.

SS-2018-04-05_10.05.07.png


Clicking on either Done or OK seem to work properly here...
 
Upvote 0

Osp

Member
Licensed User
Longtime User
Did you look into the log? I get the error message mentioned as soon as the keyboard opens and the app does not automatically recognize an "enter" event with the native keyboard. Only the OK button works. If I compare this with Android - over there the "done" button is doing the same like the webview's OK button.
Is the error supposed to show up on IOS and is there no "end the input" event when done is pressed on IOS?
 
Upvote 0

Osp

Member
Licensed User
Longtime User
The only thing the native done button on IOS is that the keyboard vanishes - for the functioning of the app it is not a problem, but I am concerned about the app store approval because of the error message appearing in the logs.
 
Upvote 0

Osp

Member
Licensed User
Longtime User
By the way, when searching for the same error message there are quite a few results popping up, seems like a common thing - here it most probably is related to the way Onsen UI is calling the keyboard functionality without those proper layout constraints applied, no idea but maybe they should call it with the UIViewNoIntrinsicMetric option (Ionic, Phone Gap, Framework 7 etc. - one can find the same error following the results on the search engines). Luckily with your framework the app does not crash seems like for example in phone gap and some other frameworks due to the error apps are stopping to work. So if the app store will accept the app there is no big problem due to it. But if there was a workaround it'd be cool. If the store doesn't accept there is a big problem though because most inputs from wkwebview would prevent apps to be ok for store. Will try soon if it's going to be accepted
 
Upvote 0

Osp

Member
Licensed User
Longtime User
...sorry for not being very to the point but though it should be understandable. Noticed that. I will tonight send you a screenshot so you can see the error msg in the logs, probably it depends on the IOS version on the phone?
 
Upvote 0

Osp

Member
Licensed User
Longtime User
Hm having trouble with the builder service. Request canceled etc. will try later!
 
Upvote 0

Osp

Member
Licensed User
Longtime User
What could be the cause of "Request canceled" when I try to build via the remote builder service? I am getting this this morning no further msgs - Internet in general works though...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Noticed that. I will tonight send you a screenshot so you can see the error msg in the logs, probably it depends on the IOS version on the phone?
No need to send me any screenshot. It will not help.

What could be the cause of "Request canceled" when I try to build via the remote builder service?
Please start a new thread for this question.
 
Upvote 0
Top