Xcode打包失败IPA processing failed
2021-05-09 本文已影响0人
玉思盈蝶
描述:
Xcode11的时候打包报这个错就有这个问题,那个时候解决办法是直接添加的移除第三方库移除x86_64和i386的脚本就好了。
脚本如下:
# Type a script or drag a script file from your workspace to insert its path.
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
更新Xcode12后发现添加脚本跑真机直接报错跑不起来。当时的解决办法是调试的时候删除脚本,只有打包才添加脚本。
今天觉得有点麻烦,然后想着解决下。
解决:
https://www.jianshu.com/p/0145916f2139
截屏2021-05-08 下午5.01.59.png WechatIMG18.jpeg 截屏2021-05-08 下午5.11.41.png上面的链接很详细了,把自己添加的第三方库移除x86_64和i386就可以啦。亲测解决哈。