25

Why is UITextfield throwing so many errors in the console?

[Assert] View <(null):0x0> does not conform to UITextInput protocol

Happens while typing in any UITextField on iOS 14 (running on physical device) using standard UITextField with no modifications.

Even if you turn all auto correct off and set traits content type to unspecified it will still throw lots of these assertion failures while typing.

Then password fields throw the following when user doesnt have iCloud keychain. (BTW this error really slows down the user it interrupts their typing when it throws this exception)

[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: com.testing.TestProject due to error: iCloud Keychain is disabled
[KBDAnalyticsLog] -[TIAnalyticsService _registerEventSpec:withCompletionHandler:]_block_invoke TIAnalyticsEventSpec with name 'thirdPartyKeyboards' is already registered.
[KBDAnalyticsLog] -[TIAnalyticsService _registerEventSpec:withCompletionHandler:]_block_invoke TIAnalyticsEventSpec with name 'thirdPartyKeyboards' is already registered.
API error: <_UIKBCompatInputView: 0x10520fd90; frame = (0 0; 0 0); layer = <CALayer: 0x283eb0e00>> returned 0 width, assuming UIViewNoIntrinsicMetric
API error: <_UIKBCompatInputView: 0x10520fd90; frame = (0 0; 0 0); layer = <CALayer: 0x283eb0e00>> returned 0 width, assuming UIViewNoIntrinsicMetric

I have also seen several other errors such as built in Keyboard having to break its own constraints just to display itself, orientation disabled messages which also slow down text input while the user is typing

Is UITextfield just broken in iOS 14 or whats up? I have never seen so much awful noise coming into the console from iOS standard libraries. And to isolate I have reproduced this in a basic project with one view controller and no external libs or even any app code.

Oh an one MORE gem, suggesting the wrong kind of content for a text field. For example suggesting a "username" when the user is entering data into a "password" field.

I would report to apple but these errors have wasted the better part of my day and now that I have confirmed they happen in "empty projects", I have to move on. From a quality standpoint its a little shocking though. And it is going to affect my users as their typing slows or stops for no reason.

Nulptr
  • 259
  • 3
  • 4
  • 2
    Could you post the test project on GitHub or similar? Thanks. I’d really like to see this phenomenon. Include instructions. I would especially like to see how you prove this affects users. – matt Oct 15 '20 at 02:28
  • Having same issue here. And the `UIScrollView` was messed up either. If you call `setContentOffset` frequently, it will throws a `CALayerInvalidGeometry CALayer bounds contains NaN`. But I never pass this kind of value to anywhere. Even if I avoid to pass zero, it still crashes. So I just need to change to use `scrollRectToVisible` to prevent this issue happen again. I don't even know how to set `CALayer` bounds to a `UIScrollView`. – Kimi Chiu Nov 27 '20 at 11:33
  • Can't say for sure, but some similar errors disappeared when I turned off a bunch of switches in Settings->General->Keyboards, like autocapitalization and predictive input. – MigMit Dec 10 '20 at 20:56
  • 1
    You might find answer in this thread https://stackoverflow.com/questions/52770550/set-a-passwordfield-to-securetextentry-give-me-a-strange-behaviour – Vova Kalinichenko Apr 22 '21 at 19:06

1 Answers1

1

I found very interesting one problem of apple. If your view controller contains 'New' in class name, above issue is happened. For example, your view controller's name is NewOnboardingViewController or SocialNewViewController. So the best way to ignore above issue is to replace 'New'

SCouto
  • 7,808
  • 5
  • 32
  • 49