IOS百度SDK人脸识别和ocr文字识别集成采坑
项目中有识别身份证信息和人脸核身的功能
去百度注册App的流程就不说了
主要说一下我的采坑的过程

刚开始下载的是图片中的第三个的示例工程。将该工程中的一些相关的framework和文件拖拽到工程中时,总会报AipOcrSdk/AipOcrSdk.h not found 或者IDLFaceSDK/IDLFaceSDK.h not found
后来发现,ocr相关的三个framework,如下图所示

是Dynamic框架,请务必使用Embedded Binary方式嵌入!!!

就把之前拖进去的framework删掉,然后使用Embedded Binary方式嵌入

but还是不行,通过framework search path 设置路径,然并卵
搞了一上午还是没有搞定,我快要疯了
最后再去仔细研读百度的文档,突然就想我为什么不把ocr与人脸识别分开弄呢?
https://ai.baidu.com/docs#/OCR-iOS-SDK/efad9fa9
上边的网址是百度的ocr文字识别的文档地址,我在其中跳转到文字识别对应的sdk下载的地方将实例工程下载下来,然后通过使用Embedded Binary的方式选择实例工程中的AipBase.framework、AipOcrSdk.framework、IdcardQuality.framework,将它们嵌入工程中

然后将上图中的aip.license文件下载下来也添加到工程中
怀着忐忑的心情,点击运行,竟然没报错,顿时振奋起来
然后在处理人脸识别的功能
https://ai.baidu.com/docs#/FaceSDK-Collect-WithLiveness-iOS/d48408e3
上边地址为人脸识别的文档地址

在此图中下载第二个“有动作活体版本 SDK”,然后将示例工程中的相关framework与依赖文件添加进去,如下图所示

集成完了如下图所示

在人脸识别中因为想使用一些示例工程中写好的类与文件,于是也将他们拖拽到了工程中

这样就集成好了,运行也没有错误
注意:
