11


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

Maxim Zakopaylov
  • 546
  • 2
  • 5
  • 23

4 Answers4

25

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/

BricoleurDev
  • 827
  • 9
  • 14
19

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
Arpan Dixit
  • 995
  • 1
  • 12
  • 24
  • 1
    Please don't take it personally. If you are coping an intellectual property from someone else, please be kind enough to give the credit back to the original creator. In this case, http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/ – Goppinath Oct 26 '16 at 06:33
  • 1
    @Goppinath Edited.My Answer. Thanks for Suggestion. – Arpan Dixit Nov 11 '16 at 12:51
  • @arpen_techisavy Good luck. – Goppinath Nov 14 '16 at 07:14
0

The script in the above two answers needs to be edited if you have an watch app in your project. Add /Frameworks to the $APP_PATH to avoid errors when building the project.

hohteri
  • 174
  • 1
  • 5
-1

If you are using LiveSDK directly or via ShareKit, you will run into this problem. In my case I was using LiveSDK directly.

Check this answer on Apple Developer Forum

https://devforums.apple.com/message/1037603#1037603

Mohan
  • 1
  • 2