打开终端,在项目里面找到你所想知道库,点击右键 show in Finder,找到这个库的上层的文件夹,然后在 终端:cd 这个文件夹的路径(或者直接cd 拖入.frameWork这层文件夹进入终端)
举例
百度OCR集成后, 直接运行无问题,但Archive/IPA/Upload AppStore 时报错"Unsupported Architecture. Your executable contains unsupported architecture '[x86_64, i386]..."
cd lib(目标目录,此处为“/百度OCR识别”)
使用lipo -info 可以查看包含的架构
命令:lipo -info AipBase.framework/AipBase
结果# Architectures in the fat file: AipBase >are: i386 x86_64 armv7 armv7s arm64移除x86_64, i386
lipo -remove x86_64 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove i386 AipBase.framework/AipBase -o AipBase.framework/AipBase
lipo -remove x86_64 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk
lipo -remove i386 AipOcrSdk.framework/AipOcrSdk -o AipOcrSdk.framework/AipOcrSdk再次查看
命令:lipo -info AipBase.framework/AipBase
结果# Architectures in the fat file: AipBase are: armv7 armv7s arm64(少了i386 x86_64)
网友评论