更新:最近又要上架,发现即使有了下面的脚本,但是使用xcode模拟器调试过,又报错。
解决办法:必须重新把工程编译缓存清空,操作如下:Product ->clean,按住Alt变成 clean build Folder...,等待操作完成,把自定义、第三方framework剔除掉x86_64, i386这两个架构的模拟设备缓存,再重新打包上传。
------------------------------------------------------------------------------------------------
1.最近更新了项目DFU功能中Zip.framework,提交App Store时候报错了
2.自建或者第三方的framework里面包含了x86_64, i386 架构,当然这个AppStore是不允许的,所有会在上传的时候报错,解决办法就是要这个framework剔除掉x86_64, i386这两个架构
3.解决办法:TARGETS->Build Phases->点击加号选择New Run Script Phase->然后复制粘贴下面代码
脚本代码:
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r F