本文为您介绍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或者编译错误

  • PCDNSDK使用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