xcode 在应用商店提交应用时出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47882400/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Issue when submitting App in app store
提问by Varinder Singh iPhone Dev
How to solve this issue.
如何解决这个问题。
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'Alladin.app/Frameworks/MercadoPagoSDK.framework/MercadoPagoSDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
ERROR ITMS-90087: "Unsupported Architectures. The executable for Alladin.app/Frameworks/MercadoPagoSDK.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90087: "Unsupported Architectures. The executable for Alladin.app/Frameworks/MercadoPagoSDK.framework contains unsupported architectures '[x86_64, i386]'.
错误 ITMS-90209:“无效的段对齐。'Alladin.app/Frameworks/MercadoPagoSDK.framework/MercadoPagoSDK' 中的应用程序二进制文件没有正确的段对齐。尝试使用最新的 Xcode 版本重建应用程序。”
错误 ITMS-90125:“二进制文件无效。LC_ENCRYPTION_INFO 加载命令中的加密信息丢失或无效,或者二进制文件已经加密。这个二进制文件似乎不是用 Apple 的链接器构建的。”
错误 ITMS-90125:“二进制文件无效。LC_ENCRYPTION_INFO 加载命令中的加密信息丢失或无效,或者二进制文件已经加密。这个二进制文件似乎不是用 Apple 的链接器构建的。”
错误 ITMS-90087:“不支持的架构。Alladin.app/Frameworks/MercadoPagoSDK.framework 的可执行文件包含不受支持的架构‘[x86_64, i386]’。” 错误 ITMS-90087:“不支持的架构。Alladin.app/Frameworks/MercadoPagoSDK.framework 的可执行文件包含不受支持的架构‘[x86_64, i386]’。
回答by Riajur Rahman
Select Project & open Build PhasesTab.
选择项目并打开构建阶段选项卡。
Under the Tab press plus button to create New Run Script Phase
在选项卡下按加号按钮创建新的运行脚本阶段
Add this shell script into run script & you are good to go
将此 shell 脚本添加到运行脚本中,您就可以开始了
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
Hope it helps.
希望能帮助到你。
回答by Dilip Mishra
I have fixed issue please follow the steps :-
我已经解决了问题,请按照以下步骤操作:-
Build Phases -> plus button -> to create New Run Script Phase
构建阶段 -> 加号按钮 -> 创建新的运行脚本阶段
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")
FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp"
case "${TARGET_BUILD_DIR}" in
*"iphonesimulator")
echo "No need to remove archs"
;;
*)
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "i386") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "i386" "$FRAMEWORK_EXECUTABLE_PATH"
echo "i386 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "x86_64") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "x86_64" "$FRAMEWORK_EXECUTABLE_PATH"
echo "x86_64 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
;;
esac
echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")
done