x86_64是模擬器平臺(tái)鲜屏,真機(jī)運(yùn)行時(shí)不可以用的,運(yùn)行真機(jī)或者發(fā)布appStore就得剔除這些個(gè)平臺(tái)盲泛,方法如下:
選中項(xiàng)目->TARGETS(項(xiàng)目)->Build Phases
項(xiàng)目里新建一個(gè) xxxxxxx.sh的文件疗隶,復(fù)制一下內(nèi)容進(jìn)去:
#!/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一下項(xiàng)目糕韧。
有的人習(xí)慣使用Application Loader來(lái)提交項(xiàng)目枫振,然后會(huì)出現(xiàn)如下錯(cuò)誤:
這就簡(jiǎn)單了,按錯(cuò)誤的提示萤彩,使用Xcode去提交項(xiàng)目粪滤,OK!搞定雀扶!