与IOHIDFamily的神秘控制台错误
对于我的一个项目,Xcode控制台中的这个错误信息每当我在iOS模拟器中运行构build时都会发生。 这已经发生了一年多了,我认为它最终会消失,更新Xcode。 我已经取消和重新链接了所有的框架,我没有明确地调用IOHIDFamily的任何东西,不pipe这是什么! 它似乎没有影响我的程序执行,但我真的很想弄清楚为什么它每次都转储所有这一切。
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)
部署到真正的iOS设备时,您正在构buildARM架构,部署到iOS模拟器时,您正在构buildx386体系结构。
在后一种情况下,您的应用程序会链接到Mac上的mach-o文件(除非有人build议您只与SDK程序集链接,而不是本机Mac链接),但是这会真的减慢构build速度,不再是可用的选项我相信最近的Xcode版本)。
显然,其中一个mach-o文件 – IOHIDFamily扩展名,如果GameKit.framework被链接为库,似乎被链接 – 并不是专门为iOS模拟器构build的。 因此,消息。 据我所知这是一个确认的苹果错误,并将在某个时候由苹果修复。
这只是iOS模拟器的一个问题,可以安全地忽略。
Vinnie发布了这个解决scheme
尝试将IOS构build选项:链接器选项设置为“仅链接SDK程序集”,为我解决了它
这里: http : //forums.xamarin.com/discussion/24656/error-running-app-after-upgrading-xamarin
禁用Game Centerfunction会为我删除这些消息。 在您的项目上,select所需的目标并转到function 。
在新的Xcode 7.2上,这些消息不再显示。
但是我有了与SpriteKit相关的新消息 :
CUICatalog: Invalid Request: requesting subtype without specifying idiom
CUICatalog:无效请求:请求子types而不指定成语
当我在iOS代码中遇到这个问题时,是因为我的两个类包含一个import基础。 新文件默认为OS X /源/ Swift文件,我没有注意到。
删除这些import消除了这个问题。
我通过继续常规选项卡解决了这个问题,取消了“ 需要全屏”选项来禁用iPad多任务。 但是,如果多任务处理不当,可能会出现validation错误!