Xcode13开发CoreData Demo点击TextField出现_PointQueue类重复报错如何解决?
Xcode13模拟器点击TextField触发类重复实现警告解决方案
问题说明
该警告为Xcode13搭配iOS15模拟器的已知系统级框架冲突,是苹果官方私有框架UIKitCore和TextInputUI重复定义内部类导致,和开发者编写的CoreData业务代码无关联,不会触发线上崩溃,仅会在模拟器调试阶段产生日志干扰。
触发警告的日志如下:
objc[6188]: Class _PathPoint is implemented in both /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) and /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). One of the two will be used. Which one is undefined. objc[6188]: Class _PointQueue is implemented in both /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) and /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). One of the two will be used. Which one is undefined.
解决方法
- 升级Xcode版本:该问题在Xcode14及后续版本已被官方修复,升级后使用对应版本的iOS模拟器运行即可完全消除该警告。
- 临时屏蔽控制台警告:如果暂时不想升级Xcode,可通过Scheme配置过滤日志:
- 打开Xcode项目,依次点击顶部菜单栏
Product→Scheme→Edit Scheme - 左侧选择
Run选项,切换到Arguments标签页 - 在
Environment Variables栏添加变量,名称填OBJC_DISABLE_NONPOINTER_ISA,值填YES,保存后重新运行项目即可
- 打开Xcode项目,依次点击顶部菜单栏
- 更换低版本模拟器:选择iOS14及更低版本的模拟器运行项目,不会触发该框架冲突警告。
注意事项
该警告仅存在于iOS15 + Xcode13的模拟器运行环境,不影响真机运行效果,也不会导致App Store审核被拒或线上崩溃,无需调整业务代码逻辑。
内容的提问来源于stack exchange,提问作者iFateh
相关产品推荐
相关产品推荐

