UITextField在iOS 14中引发各种错误 [英] UITextField throwing all kinds of errors in iOS 14

查看:586
本文介绍了UITextField在iOS 14中引发各种错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么UITextfield在控制台中引发了这么多错误?

Why is UITextfield throwing so many errors in the console?

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

在不使用修改的情况下使用标准UITextField在iOS 14上键入任何UITextField(在物理设备上运行)时发生.

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

即使您关闭了所有自动更正功能并将traits内容类型设置为unspecified,它在键入时仍会引发许多此类断言失败.

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.

当用户没有iCloud钥匙串时,密码字段将引发以下内容.(顺便说一句,此错误确实会减慢用户的速度,并在抛出此异常时打断他们的输入)

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

UITextfield是否刚在iOS 14中损坏或怎么了?我从未见过iOS标准库在控制台中发出如此多的可怕声音.为了隔离,我在一个只有一个视图控制器且没有外部库甚至任何应用程序代码的基本项目中都复制了此代码.

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.

推荐答案

我发现了一个非常有趣的苹果问题.如果您的视图控制器在类名中包含"New",则发生了上述问题.例如,您的视图控制器的名称为 NewOnboardingViewController SocialNewViewController .因此,忽略上述问题的最佳方法是替换新建"

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'

这篇关于UITextField在iOS 14中引发各种错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆