[英]BrainTree test flight upload unsupported architecture error
Xcode version 7.2 BrainTreeFramework 3.9.7 Xcode版本7.2 BrainTreeFramework 3.9.7
When i try to upload build to test flight getting unsupported architecture. 当我尝试上传构建以测试不受支持的架构的飞行时。 I spent many hours on this.but no success.
我为此花了很多时间,但没有成功。 any help will be appreciated.
任何帮助将不胜感激。 thanks in advance
提前致谢
The problem is that the BrainTreeFramework
contains a build for both the simulator (x86_64) and the actual devices (ARM). 问题在于
BrainTreeFramework
包含针对模拟器(x86_64)和实际设备(ARM)的构建。
you need to "manually" remove the unnedeed architectures from the final binary, before submitting it. 您需要“手动”从最终二进制文件中删除不需要的体系结构,然后再提交。
Daniel Kennett
given a nice solution and provides this script to add to the build phase: 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
go through the link once it will work for me. 请通过该链接对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.