x86_64是模拟器平台,真机运行时不可以用的,运行真机或者发布appStore就得剔除这些个平台,方法如下:
选中项目->TARGETS(项目)->Build Phases
项目里新建一个 xxxxxxx.sh的文件,复制一下内容进去:
#!/bin/sh
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
echo "current binary ${binary}"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
forarchin$archs;do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
if[ -f"$binary"];then
# Strip non-valid architectures in-place
lipo -remove"$arch"-output"$binary""$binary"||exit1
stripped="$stripped $arch"
fi
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
}
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 |whileread-r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaultsread"$FRAMEWORK/Info.plist"CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
strip_invalid_archs "$FRAMEWORK_EXECUTABLE_PATH"
done
ok,到这里就可以了,然后Clean一下项目。
有的人习惯使用Application Loader来提交项目,然后会出现如下错误:
这就简单了,按错误的提示,使用Xcode去提交项目,OK!搞定!