AVCaptureDevice 找不到ManyCam

问题

Xcode 版本12.4

以前都有,现在新建的项目写demo时找不到视频设备 ManyCam。

报错

2021-03-22 16:30:32.856836+0800 FindManyCam[74998:8777536] Error loading /Library/CoreMediaIO/Plug-Ins/DAL/ManyCamVideoDeviceCMIO.plugin/Contents/MacOS/ManyCamVideoDeviceCMIO:  dlopen(/Library/CoreMediaIO/Plug-Ins/DAL/ManyCamVideoDeviceCMIO.plugin/Contents/MacOS/ManyCamVideoDeviceCMIO, 262): no suitable image found.  Did find:
    /Library/CoreMediaIO/Plug-Ins/DAL/ManyCamVideoDeviceCMIO.plugin/Contents/MacOS/ManyCamVideoDeviceCMIO: code signature in (/Library/CoreMediaIO/Plug-Ins/DAL/ManyCamVideoDeviceCMIO.plugin/Contents/MacOS/ManyCamVideoDeviceCMIO) not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs

原因

Typically, the Hardened Runtime’s library validation prevents an app from loading frameworks, plug-ins, or libraries unless they’re either signed by Apple or signed with the same team ID as the app. 

找不到的原因是因为 ManyCam 虚拟摄像头插件的签名和我们的项目的签名不一致,不是在同一个team ID下。所以被阻止加载了。

解决

开启disable-library-validation

image-20210322162904204.png

详见:https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation?language=objc

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容