1.真机编译错误
ld: warning: directory not found for option ‘-L/Users/XXX/Downloads/ios’
ld: ‘/XXX/Common/ALiPay/AlipaySDK.framework/AlipaySDK’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因分析:
是由于支付宝AlipaySDK的二进制库不支持bitcode.而Xcode默认是要支持bitcode的,而且如果支持的话,其中所有的二进制库和framework都必须包含bitcode。
解决办法:
在build setting 中搜索bitcode,并设置Enable Bitcode为NO即可。
2.缺少.a 文件,在build phases 里面按照说明文档仔细加入。
3.很多时候可能是路径不对,仔细检查!然后在build setting - search paths 里面修改。(找不到#include<openssl/asn1.h>错误,可能是openssl.a文件没有导入)