๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐ŸŽ iOS/Error Handling

[Error, Xcode] App Store Connect Operation ErrorERROR ITMS-90087: "Unsupported Architectures. The executable for .framework contains unsupported architectures '[x86_64, i386]'." ์—๋Ÿฌ ํ•ด๊ฒฐ๋ฒ•

[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

 

ํ”„๋ ˆ์ž„์›Œํฌ๋ณ„๋กœ ํ•˜๋‚˜ํ•˜๋‚˜ ํ•˜๋Š๋ผ ๊ณ ์ƒํ–ˆ์ง€๋งŒ ํ•ด๊ฒฐ๋˜์–ด์„œ ๋ฟŒ๋“ฏ ^__^*

728x90
๋ฐ˜์‘ํ˜•