ERROR ITMS-90087
项目上架,打包遇到[x86_64, i386]问题,先把问题扔出来
iTunes Store Operation Failed
ERROR ITMS-90087: "Unsupported Architectures. The executable for MMMagazineReadList.app/Frameworks/HelpDesk.framework contains unsupported architectures '[x86_64]'."
iTunes Store Operation Failed
ERROR ITMS-90087: "Unsupported Architectures. The executable for MMMagazineReadList.app/Frameworks/HyphenateLite.framework contains unsupported architectures '[x86_64, i386]'."
iTunes Store Operation Failed
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'MMMagazineReadList.app/Frameworks/HelpDesk.framework/HelpDesk' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
方法一:偶尔有用
刚刚开始找到的解决方案是让我加入一个脚本,具体如下(具体效果:第一次有效果,之后打包还是会遇到同样的问题,而且第二次过后就会效果失效,不知道原因,了解的大神请告知,谢谢)
在项目-->Build Phases -->Run Script 添加如下shell脚本,然后再试试打包。
# Without further ado, here’s the script. Add a Run Script step to your build steps, put it after your step to embed frameworks, set it to use /bin/sh and enter the following script:
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
方法二:亲测有用
由于该问题的产生原因是因为x86_64, i386是模拟器使用的,而打包上传appStore是不允许的,所以需要移除这个框架
我的项目里面因为有环信的原因,有HelpDesk.framework和HyphenateLite.framework包含了这个,所以需要到这两个framework下移除,具体操作如下:
1、打开终端,进入你的framework的路径下(cd /Users/MAC/Desktop/MyProject/HyphenateLite.framework)
2、lipo -remove i386 HyphenateLite -o HyphenateLite && lipo -remove x86_64 HyphenateLite -o HyphenateLite
【若有其他库,在进入,移除一下就好】
3、重新打开项目,clean一下,Build一下,记住不要跑模拟器,然后打包,上传成功
ERROR ITMS-90535
报错信息如下
ERROR ITMS-90535:"Unexpected CFBundleExecutable Key. The bundle at ‘XXX.app/EaseUIResource.bundle’ does not contain a bundle executable.
If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL.
If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.”
报错信息详细已经指出XXX.app/EaseUIResource.bundle中存在一个不可执行的字段,需要将此字段移除,即从报错可以看出是CFBundlePackageType字段需要删除;
我的项目是因为集成了环信人工互动云SDK,其中的HelpDeskUIResources.bundle中的info.plist文件移除了Executable file为key,HelpDeskResource为value的配置,问题解决!