M1 Pro设备Xcode14下iOS模拟器类重复实现错误求助
解决Xcode14 + M1 Pro模拟器出现SBFCARendererImageRepresentation类重复实现警告
问题背景
设备:M1 Pro;开发环境:Xcode14;新建默认项目运行模拟器时,控制台输出如下警告:
objc[6742]: Class SBFCARendererImageRepresentation 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/SpringBoardFoundation.framework/SpringBoardFoundation (0x1067895a0) 和 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PaperBoardUI.framework/PaperBoardUI (0x104ffd930). One of the two will be used. Which one is undefined.
问题本质
这是苹果iOS模拟器私有框架(SpringBoardFoundation和PaperBoardUI)的内部类重复实现警告,不属于项目代码问题,也不会影响项目的正常编译、运行和功能,是Xcode14搭配M1系列设备运行部分iOS模拟器版本时的常见现象。
处理方案
- 直接忽略:如果项目能正常运行,完全可以不用管这个警告,它不会导致崩溃或功能异常。
- 清理模拟器缓存:关闭模拟器后,打开Xcode的
Window > Devices and Simulators,选中当前使用的模拟器,右键选择「Erase All Content and Settings」,重启模拟器后再运行项目,部分情况下能消除该警告。 - 更新Xcode或模拟器运行时:升级Xcode到14.3及以上的后续版本,或者在Xcode中更新iOS模拟器的运行时版本,苹果后续的修复会解决这类私有框架的冲突问题。
- 切换模拟器:如果特定模拟器版本出现该问题,尝试切换到其他iOS版本的模拟器(比如从iOS16切换到iOS15),或者更换不同尺寸的模拟器设备,大概率能规避这个冲突。
内容的提问来源于stack exchange,提问作者melee
相关产品推荐
相关产品推荐

