首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Xcode 12 beta和iOS 14:奇怪的控制台日志"objc[5551]:Class .在这两种情况下都实现了“

Xcode 12 beta和iOS 14:奇怪的控制台日志"objc[5551]:Class .在这两种情况下都实现了“
EN

Stack Overflow用户
提问于 2020-07-18 16:14:02
回答 4查看 7.6K关注 0票数 40

我刚刚下载了Xcode 12 beta 2,现在在运行我的应用程序时,我在控制台上看到了一堆奇怪的日志(使用Xcode 11.5时不会出现这些警告)。

它们看起来像下面的那个:

代码语言:javascript
运行
复制
objc[5551]: Class CSAudioFileManager is implemented in both 
/Applications/Xcode-beta.app/Contents/Developer/Platforms/
iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/
Contents/Resources/RuntimeRoot/System/Library/
PrivateFrameworks/SpeakerRecognition.framework/SpeakerRecognition (0x1382890e0) 
and 
/Applications/Xcode-beta.app/Contents/Developer/Platforms/
iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/
Contents/Resources/RuntimeRoot/System/Library/
PrivateFrameworks/CoreSpeech.framework/CoreSpeech (0x13772c7a8).
 One of the two will be used. Which one is undefined.

我还为其他类(CSVoiceIdXPCClientCSNNVADEndpointAnalyzerCSAudioRecordContextCSOSTransaction等)获取了这类日志。该应用程序使用CoreData (与CloudKit结合使用)、FileManager和UserDefaults。如果应用程序使用Xcode 11.5运行,日志就不会显示,而且在大多数类中,我很确定它们没有在我的代码中使用(至少我没有故意使用它们)。

注意,当使用iOS 14.0运行模拟设备时,日志就会出现。例如,如果您选择iPhone 11 Pro (13.5),那么日志就不会出现(仍然使用Xcode 12)。

那么,是否存在解决此问题的方法,还是仅仅是当前Xcode 12 beta版本的错误,在发布进一步的Xcode 12 beta版本时将被删除?

编辑:

现在objc[5551]...objc[6229]...所取代

EN

回答 4

Stack Overflow用户

发布于 2020-07-28 13:24:20

我有相同的日志(使用Xcode Beta 3)。我认为这可能与当前的Xcode 12测试版有关。

编辑:那些日志不再出现在我面前了。Xcode 12.0.1 (12A7300)

票数 7
EN

Stack Overflow用户

发布于 2021-03-20 19:24:33

在我的例子中,CoreSpeechSpeakerRecognition重复符号的问题开始出现,因为我意外地删除了~/Library/Developer/CoreSimulator/Caches中的dyld模拟器缓存。缓存可以通过以下方式还原:

使用xcrun simctl list -j runtimes

  • In查找问题所在的运行时--运行时使用json对象--您希望能够找到bundlePathruntimeRootidentifierbuildversion

  • Lookup --使用sw_vers -buildVersion

  • In的$(bundlePath)/Contents/Resources目录为MacOS找到构建版本--您将找到update_dyld_sim_shared_cache executable

  • Call update_dyld_sim_shared_cache。将-root选项指定为运行时json对象中的runtimeRoot。将~/Library/Developer/CoreSimulator/Caches/dyld/$(mac_os_build_version)/$(identifier).$(buildversion).指定为-cache_dir

如果在Big Sur 11.3 Beta、Xcode 12.4和模拟器运行时14.4上运行该命令,则组装的update_dyld_sim_shared_cache调用如下所示:

代码语言:javascript
运行
复制
/Applications/Xcode12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/update_dyld_sim_shared_cache -root /Applications/Xcode12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot -cache_dir ~/Library/Developer/CoreSimulator/Caches/dyld/20E5196f/com.apple.CoreSimulator.SimRuntime.iOS-14-4.18D46
票数 4
EN

Stack Overflow用户

发布于 2021-08-18 03:39:43

这个问题是通过删除Xcode 12.5.1并重新安装来解决的。我在这里看到myjunk的一条评论,建议这样做,是的,它对我有用。

我还在这台机器上安装了Xcode 13测试版和发行版。我在Xcode测试版上构建并运行了相同的项目,在Xcode 12.5.1上看到了这些问题,没有问题,更重要的是,回到Xcode 12.5.1问题仍然得到解决。重新安装Xcode 12.5.1成功了,看起来您不必担心也会使用测试版一定会导致它们返回.

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62970821

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档