[ERROR]
App Store Connect Operation Error
ERROR ITMS-90087: "Unsupported Architectures. The executable for .framework contains unsupported architectures '[x86_64, i386]'."
์ธ๋ถ SDK๋ฅผ ํ๋ก์ ํธ์ import ํด์ ๊ฐ๋ฐํ ๊ฒฝ์ฐ ๋ฐ์ํ ์๋ฌ์ ๋๋ค.
debug๋ชจ๋์์๋ ๋น๋์ ๋ฌธ์ ๊ฐ ์๊ณ archive์์๋ ๋ฌธ์ ๊ฐ ์๋๋๋ฐ ๋ง์ง๋ง distributionํ ๋ ๋ฐ์ํ์ด์.^_^
ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ๋ฐ๋ก ์์ด์ ํด๊ฒฐํ์ต๋๋ค ํด๐
์ฐธ๊ณ ๋งํฌ >> https://stackoverflow.com/questions/42641806/check-and-remove-unsupported-architecture-x86-64-i386-in-ipa-archive
์กฐ์ฌ๋ฅผ ํด๋ณด๋ ์ ํ์์๋ ์ด์ ์๋ฎฌ๋ ์ดํฐ ์ํคํ ์ฒ๊ฐ ๋ฐฐํฌ ๋น๋์ ํฌํจ๋์ด์์ผ๋ฉด ์ฑ์คํ ์ด์ ์ ๋ก๋ ๋ชป ์ํค๊ฒ ํ๊ณ ์์ต๋๋ค.
๊ทธ๋์ i386๊ณผ x86_64๋ ์ญ์ ๋ฅผ ํด์ค์ผ ํฉ๋๋ค.
์ญ์ ํ๋ ๋ฐฉ๋ฒ์ 2๊ฐ์ง์ ๋๋ค.
๐ฑ Solution1. ํ๋ก์ ํธ์ ์คํฌ๋ฆฝํธ๋ฅผ ํฌํจ์์ผ์ ๋น๋์ ์๋์ผ๋ก ์ญ์ ํ๋ ๋ฐฉ๋ฒ
TARGETS > Build phases > Run Script ์ ์๋ ๋ด์ฉ์ ์์ฑํฉ๋๋ค.
Shell :
/bin/sh
Code :
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
๐ฑ Solution2. ์ผํ์ฑ์ผ๋ก ํฐ๋ฏธ๋์ ์ด์ฉํ์ฌ ์ญ์ ํ๋ ๋ฐฉ๋ฒ
์ ๋ ์คํฌ๋ฆฝํธ ํฌํจํ๋๋ฐ๋ ์๋ผ์ ํฐ๋ฏธ๋๋ก ์ญ์ ํ๋๊น ํด๊ฒฐ๋์์ด์!!
๋ฌธ์ ๊ฐ ๋ฐ์ํ ํ๋ ์์ํฌ๊ฐ ํฌํจ๋ ํด๋์์ ํฐ๋ฏธ๋ ์ด์ด์ ์๋ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ฌ ์ญ์ ํฉ๋๋ค.
lipo -remove i386 ProjectFramework_SDK -o ProjectFramework_SDK
lipo -remove x86_64 ProjectFramework_SDK -o ProjectFramework_SDK
ํ๋ ์์ํฌ๋ณ๋ก ํ๋ํ๋ ํ๋๋ผ ๊ณ ์ํ์ง๋ง ํด๊ฒฐ๋์ด์ ๋ฟ๋ฏ ^__^*