Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR ITMS-9000: "Unsupported architectures. Your executable contains unsupported architectures '[x86_64, i386]'"


It is impossible to send in itunesconnect new version of the application. Although last week, the same version send happened. In the code, I just changed the name of a button, no more changes are not made ​​where.
But always get error:

ERROR ITMS-9000: "Unsupported architectures. Your executable contains unsupported architectures '[x86_64, i386]'"

In my project -> Build Settings: ARCHS = $(ARCHS_STANDARD_32_BIT)
//:configuration = Debug
ONLY_ACTIVE_ARCH = YES
//:configuration = Release
ONLY_ACTIVE_ARCH = NO

VALID_ARCHS = armv7 armv7s

like image 956
Maxim Zakopaylov Avatar asked Sep 17 '14 09:09

Maxim Zakopaylov


2 Answers

You can remove unwanted ARCHS from IPA by putting below peace of Shell Script in Build Phase -- > RUN Script This Script removes all simulator ARCHS from IPA and ARCH issues from Embedded framework. Source : http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

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
like image 74
Arpan Dixit Avatar answered Oct 22 '22 12:10

Arpan Dixit


Check out this slick solution on Daniel Kennett's blog - it worked perfectly for me with the SpritzSDK, which I had similar issues with.

He supplies a script you can drop-in to your build phases to strip out the unwanted architectures as a last step - doesn't break the simulator, and iTunesConnect approved my upload as well on the first try.

http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

like image 42
BricoleurDev Avatar answered Oct 22 '22 13:10

BricoleurDev