xcode IOHIDFamily 的神秘控制台错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29785320/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:02:55  来源:igfitidea点击:

Mystery console error with IOHIDFamily

iosobjective-cxcode

提问by avance

For one of my projects, this error message in Xcode's console happens every time I run a build in the iOS Simulator. It's been happening for over a year and I thought it would eventually go away with an update to Xcode. I've dereferenced and relinked all the Frameworks and I am not explicitly calling anything from the IOHIDFamily, whatever that is! It doesn't seem to affect my program execution but I would really like to figure out why it dumps all this every time.

对于我的一个项目,每次我在 iOS 模拟器中运行构建时,都会在 Xcode 的控制台中出现此错误消息。它已经发生了一年多,我认为它最终会随着 Xcode 的更新而消失。我已经取消引用并重新链接了所有框架,并且我没有明确调用 IOHIDFamily 中的任何内容,无论是什么!它似乎不会影响我的程序执行,但我真的很想弄清楚为什么它每次都转储所有这些。

2015-04-21 18:20:13.997 Vector-Z_beta[12370:1453236] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
    /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-04-21 18:20:13.997 Vector-Z_beta[12370:1453236] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78da9a80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-04-21 18:20:13.997 Vector-Z_beta[12370:1453236] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
    /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-04-21 18:20:13.997 Vector-Z_beta[12370:1453236] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78da9a80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-04-21 18:20:13.998 Vector-Z_beta[12370:1453236] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
    /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-04-21 18:20:13.998 Vector-Z_beta[12370:1453236] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78da9a80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-04-21 18:20:13.998 Vector-Z_beta[12370:1453236] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib:  dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found.  Did find:
    /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-04-21 18:20:13.998 Vector-Z_beta[12370:1453236] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78da9a80 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)

回答by Integrating Stuff

When deploying to a real iOS device you are building for an ARM architecture, when deploying to the iOS simulator you are building for an x386 architecture.

部署到真正的 iOS 设备时,您是为 ARM 架构构建的,而部署到 iOS 模拟器时,您是为 x386 架构构建的。

In the latter case your app links with mach-o files present on your Mac (unless as someone suggested you only link with SDK assemblies, not native Mac ones, but this will really slow down your build and isn't an available option anymore in recent Xcode versions I believe).

在后一种情况下,您的应用程序会与 Mac 上的 mach-o 文件链接(除非有人建议您只链接 SDK 程序集,而不是本机 Mac 程序集,但这确实会减慢您的构建速度,并且在我相信最近的 Xcode 版本)。

Apparently, one of these mach-o files - the IOHIDFamily extension one, which seems to be linked if GameKit.framework is linked as a library - is not specifically built for the iOS simulator. Hence, the message. As I understand this is a confirmed Apple bug and will be fixed by Apple at some point.

显然,这些 mach-o 文件之一 - IOHIDFamily 扩展名,如果 GameKit.framework 作为库链接,它似乎是链接的 - 不是专门为 iOS 模拟器构建的。因此,消息。据我所知,这是一个已确认的 Apple 错误,Apple 将在某个时候修复。

It is an issue with the iOS simulator only and can be safely ignored.

这仅是 iOS 模拟器的问题,可以安全地忽略。

回答by Larry B

Vinnie posted this solution

Vinnie 发布了这个解决方案

try setting the IOS Build Options: Linker options to "Link SDK assemblies only", fixed it for me

尝试将 IOS 构建选项:链接器选项设置为“仅链接 SDK 程序集”,为我修复它

here: http://forums.xamarin.com/discussion/24656/error-running-app-after-upgrading-xamarin

在这里:http: //forums.xamarin.com/discussion/24656/error-running-app-after-upgrading-xamarin

回答by Dominique Vial

Disabling Game Center capabilities remove these messages for me. On your Project, select the Desired targetand go to Capabilities.

禁用 Game Center 功能会为我删除这些消息。在您的项目中,选择Desired 目标并转到Capabilities

回答by Dominique Vial

On new Xcode 7.2 these messages do not display anymore.

在新的 Xcode 7.2 上,这些消息不再显示。

But I have new messages related to SpriteKit:
CUICatalog: Invalid Request: requesting subtype without specifying idiom

但我有与SpriteKit相关的新消息
CUICatalog: Invalid Request: requesting subtype without specifying idiom

CUICatalog: Invalid Request: requesting subtype without specifying idiom

CUICatalog:无效请求:请求子类型而不指定习语

回答by Refactor

When I encountered this problem in iOS code, it was because two of my classes contained an import Foundation. New File was defaulting to OS X / Source / Swift file and I hadn't noticed.

当我在iOS代码中遇到这个问题时,是因为我的两个类包含了一个import Foundation。新文件默认为 OS X / Source / Swift 文件,我没有注意到。

Removing those imports eliminated the problem.

删除这些进口产品就解决了这个问题。

回答by itzo

I solved this issue by going on GENERAL tab and uncheck Requires Full Screenoption to disable iPad multitasking. But you can get validation errors if multitasking is not handled properly!

我通过进入“常规”选项卡并取消选中“需要全屏”选项以禁用 iPad 多任务处理来解决此问题。但是,如果未正确处理多任务处理,您可能会收到验证错误!

Requires Full Screen

需要全屏