Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR ITMS-90085: “No architectures in the binary. Lipo failed to detect any architectures in the bundle executable.”

We have built a Xamarin app (iOS, Android) with several native bindings. The app runs fine on device and simulator and we are able to build an archive without any issues (apparently).

The issue is when we want to upload the build to the app store (using the app loader or xcode 7.3.1), we get the following error:

ERROR ITMS-90085: “No architectures in the binary. Lipo failed to detect any architectures in the bundle executable.”

Running lipo -info on the app yields the following response :

Architectures in the fat file: NameOfMyApp.iOS.app/NameOfMyApp.iOS are: armv7 arm64

We have searched for an answer thoroughly before posting this question and have made sure of the following:

  • The product name is correct
  • Xcode is installed
  • Application loader is the latest version
  • Bundle Id is correct

If anyone has an idea the help would be greatly appreciated!

Thanks, A.

like image 319
Anthony Janssens Avatar asked Sep 06 '16 16:09

Anthony Janssens


3 Answers

I recently ran into this error for a totally different reason. We were using this really popular script to remove unused architectures from our app before app store submission.

The problem is that this script does the totally wrong thing if you include a watch app and are building with Xcode 10! It looks for all architectures in the ARCHS variable and removes all other architectures from fat binaries, the problem is

  • ARCHS doesn't include watch architectures, and
  • starting in Xcode 10, watch binaries are fat (due to the new watch)

In XCode 9 the script would skip over watch stuff, but now it wrongly strips them.

I fixed the error by changing the script to instead only remove simulator architectures.

EXTRACTED_ARCHS=()
GOOD_ARCHS=()

PRESENT_ARCHS=($(lipo -archs "$FRAMEWORK_EXECUTABLE_PATH"))

if [[ "${#PRESENT_ARCHS[@]}" -lt 2 ]]
then
    echo "Framework is not a Fat binary, skipping..."
    continue
fi

for ARCH in "${PRESENT_ARCHS[@]}"
do
    if [[ "$ARCH" != x86_64 && "$ARCH" != i386 ]]
    then
        echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
        lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
        GOOD_ARCHS+=("$ARCH")
        EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
    fi
done
like image 78
Max Avatar answered Nov 03 '22 14:11

Max


So it turns out that we were doing some native bindings in our project. In one of these bindings we included a framework at the root of the project, the framework being a folder that includes sub-folders that contain the lib.a. It turns out that at compilation time the whole framework folder structure was being copied into the resulting IPA and this was causing the issue. The solution was to simply extract the lib.a and move it to the root of the project and delete the framework folder. The resulting IPA no longer had the framework folder and the submission went through without a glitch.

like image 5
Anthony Janssens Avatar answered Nov 03 '22 12:11

Anthony Janssens


May sometimes this error occurs when you in hurry and forgot to change Build Environment to Generic iOS Device for Archiving !

Find image here!

like image 2
Mushrankhan Avatar answered Nov 03 '22 12:11

Mushrankhan