Class 当我单击文本字段时,_PointQueue 在两者中都实现了...我该如何解决这个问题?

Class _PointQueue is implemented in both when I click on textfield... How can I resolve this issue?

我正在使用 xcode 13 并在 coredata 上制作演示。

objc[6188]: Class _PathPoint 在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore ( 0x114a8fa78) 和 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x12cd4a8b0)。将使用两者之一。哪一个是未定义的。

objc[6188]: Class _PointQueue 在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore ( 0x114a8fa50) 和 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x12cd4a8d8)。将使用两者之一。哪一个是未定义的。

Apple 开发者 Quinn “爱斯基摩人!” @开发者技术支持@Apple回答了这个问题here:

This is not an error per se. Rather, it’s the Objective-C runtime telling you that:

  • Two frameworks within your process implement the same class (well, in this case classes, namely _PathPoint and _PointQueue).
  • The runtime will use one of them, choosing it in an unspecified way.

This can be bad but in this case it’s not. Both of the implementations are coming from the system (well, the simulated system) and thus you’d expect them to be in sync and thus it doesn’t matter which one the runtime uses.

So, in this specific case, these log messages are just log noise.

我遇到了同样的错误。我在 textView

中有 hyperlink

--> 例如“我读过 Privacy Notice ...”

然后我意识到我进入hyperlink的link必须满足通用条件。我的 hyperlink 是;

大小写错误 --> "https://www.AçıkRıza.com"

真实案例 --> "https://www.acikriza.com"

然后我就能够成功构建它了。

当您在自己也有手势识别器的视图中添加手势识别器时,通常会发生此错误。在您的情况下,您可能已将 textField 添加为具有某种手势识别器或滚动的视图的子视图。因此,当您点击该文本字段时,它不知道要触发哪个手势。因此,查看您的实现并确定 textView 是否在另一个具有 geture 的视图中。

在我的例子中,我创建了一个视图,它有一个手势识别器,并且这个视图有一个 UITextView() 作为子视图。因此,当点击父视图并使用手势时,我会收到此错误。我通过在我的 textView 上禁用用户交互来解决它。


textView.isUserInteractionEnabled = false