100 多个“在 MapKit 和 VectorKit 中实现的类";Xcode 9.0.1 及更高版本的警告 [英] 100+ "Class implemented in both MapKit and VectorKit" warnings with Xcode 9.0.1 and above

查看:31
本文介绍了100 多个“在 MapKit 和 VectorKit 中实现的类";Xcode 9.0.1 及更高版本的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行我的项目(它甚至不使用 MapKit)时,我的控制台收到了超过一百个类重复警告的垃圾邮件:

<块引用>

objc[6377]:类 ___MKPlaceBusinessInfoItemAccessibility_super 在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit (0x12f128f00) 和/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/VectorKit.axbundle/VectorKit (0x12f2187b0).将使用两者之一.哪个是未定义的.

这些警告在 Xcode 9.0.0不存在,我只在 Xcode 9.0.1 及更高版本上遇到这种情况.>

我知道这是一个错误并且我发现了一个雷达这就是关于这个问题.有没有办法让这些警告静音而不影响其他 SDK 警告的可见性?

解决方案

这实际上是当前 iOS Framework 中的一个错误,与您的应用程序、模块缓存、库等中的任何内容无关.非确定性的是它仅在可访问层处于活动状态时才存在,而在模拟器上并不存在,除非在非常特定的情况下.我知道的三个:

  • 无障碍检查器已开启
  • UI 插桩测试
  • OSX 的 VoiceOver 已开启(其他 AT 也是如此)

要消除这种情况,您应该:

  • 退出辅助功能检查器(如果已打开)
  • 打开模拟器
  • 硬件 ->清除所有内容和设置"
  • 重新运行应用程序.
  • 绝对不要使用辅助功能检查器运行此模拟器
  • 绝对不要在这个模拟器上运行 UI 测试,它也依赖于辅助功能层来完成它们的工作,尽管我认为这样做不会导致错误持续存在,直到您再次擦除所有....",它只会出现在该测试运行中.

每次执行最后两个要点之一时,都必须再次清除数据...

核心问题是 MapKit 和 VectorKit 都链接到核心可访问性包,但显然没有动态链接,因此这些包都包含在两个模块中.尽管非常冗长且令人沮丧,但可以非常安全地忽略此类警告.

不幸的是,没有其他修复方法...如果您不需要 iOS 11 功能,也许您可​​以下载旧版本的模拟器.或者只是不要运行仪器测试/辅助功能检查器/VoiceOver/我希望他们尽快修复!

While running my project (which doesn't even use MapKit), my console gets spammed with more than a hundred class duplicate warnings:

objc[6377]: Class ___MKPlaceBusinessInfoItemAccessibility_super is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit (0x12f128f00) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/VectorKit.axbundle/VectorKit (0x12f2187b0). One of the two will be used. Which one is undefined.

These warnings were not present with Xcode 9.0.0, I am only experiencing this on Xcode 9.0.1 and above.

I am aware that this is a bug and I found a radar that is about this issue. Is there a way to silence these warnings without affecting the visibility of other SDK warnings?

解决方案

This is actually a bug in the current iOS Framework and has nothing to do with anything in your app, module cache, libraries, etc. The reason this appears to be non deterministic is that it is only there when the Accessibility Layer is active, which it isn't on the simulator, except under very specific circumstances. The three I'm aware of:

  • The Accessibility Inspector is on
  • UI Instrumented Testing
  • VoiceOver for OSX is On (other ATs as well)

To get this to go away you should:

  • Exit Accessibility Inspector (if it's on)
  • Open Simulator
  • Hardware -> "Erase All Content and Settings"
  • Re run application.
  • Literally NEVER run this simulator with the Accessibility Inspector
  • Literally NEVER run UI tests on this simulator, which also rely on the Accessibility Layer to do their work, though I don't think doing so will cause the error to stick around until you "Erase all...." again, it will just be present for that test run.

Every time you do one of those last two bullet points, you will have to clear the data again...

The core issue is that MapKit and VectorKit both link to core accessibility bundles, but apparently have not done so dynamically, so those bundles are included in both modules. Such warnings are very safely ignored, though very verbose and frustrating.

Unfortunately there is no other fix for this... maybe you could download an old version of the simulator if you don't need iOS 11 features. Or just don't run instrumented tests/Accessibility Inspector/VoiceOver/I HOPE THEY FIX THIS SOON!

这篇关于100 多个“在 MapKit 和 VectorKit 中实现的类";Xcode 9.0.1 及更高版本的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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