本文介绍PCDN与iOS对接的常见问题。
iOS平台编译错误
-
ld: Undefined symbols for architecture armv7:"_func", referenced from:
解决办法:将调用方源码文件名
*.m
修改为*.mm
。 -
ld: Undefined symbols for architecture armv7: "___gxx_personality_sj0", referenced from:
解决办法:将调用方源码文件名
*.m
修改为*.mm
。 -
“xxx 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 arm64”
解决办法:官网提供的SDK为关闭bitcode版本,如果有特殊需要,请与对接人员沟通获取开启了bitcode版本。
iOS平台openssl版本冲突引发crash或编译错误
PCDN SDK使用openssl版本为1.0.2n,请调整App中openssl版本与PCDN所用版本一致。
App Store提交失败
- 问题现象
- 解决方法
去掉模拟器架构,可参见如下脚本:
#!/bin/sh unzip PCDNSDK.library.zip lipo PCDNSDK.framework/PCDNSDK -thin armv7 -output PCDNSDK_armv7 lipo PCDNSDK.framework/PCDNSDK -thin arm64 -output PCDNSDK_arm64 lipo -create PCDNSDK_armv7 PCDNSDK_arm64 -output PCDNSDK rm PCDNSDK.framework/PCDNSDK rm PCDNSDK_armv7 PCDNSDK_arm64