IOS 上传IPA遇到的问题

前言:

最近在上传iOS应用的项目,遇到了很多坑,每次自己遇到坑的时候就想记录下来~~~

  1. 我遇到的第一个坑
IOS 上传IPA遇到的问题_第1张图片
D1836CAB-04F5-4095-AE79-203368F35C44.png

原因是我在apple developer 官网下载的 application loader 是3.0 而我自己xcode的是3.6 我用3.0上传导致出问题

  1. framework 的坑

ERROR ITMS-90087: "Unsupported Architectures. The executable for ***.app/Frameworks/SDK.framework contains unsupported architectures '[x86_64, i386]'."

这个就是自己创建或引入的framework 里面的x86_64和i386没有剔除 ,经过调研了很多网上的解决方案

Daniel Kennett
这个人给出的解决方案 感谢感谢~

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 FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"

EXTRACTED_ARCHS=()

for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"

done

欢迎大家一起补充啊

你可能感兴趣的:(IOS 上传IPA遇到的问题)