14
votes

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.

5
This is very likely a name mismatch either in your info.plist file or with previous published builds in the AppStore. Please double check directly in the info plist of the final app bundle to see if it reflects the expected valuedalexsoto
Thanks @Mack but we had checked all the names and there was no mismatch. The problem was an unnecessary folder structure in a native binding project (see my answer).Anthony Janssens
@AnthonyJanssens ok so eventually you resolved it thats greatMayur

5 Answers

6
votes

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
5
votes

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.

2
votes

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

Find image here!

0
votes

In my case the error was a bit misleading. It had nothing to do with architectures, it just wasn't finding the binary itself.

I'm generating an app extension through CMake, using add_library. CMake renames the extension's executable from MyExtension to libMyExtension.so.

Since "CFBundleExecutable must match the name of the bundle directory minus its extension.", I had to tweak my CMakeLists.txt file to prevent that the extension's executable is renamed:

set_target_properties(${APPEX_NAME} PROPERTIES
        XCODE_ATTRIBUTE_EXECUTABLE_SUFFIX ""
        XCODE_ATTRIBUTE_EXECUTABLE_PREFIX ""
)
-3
votes

In my case,

turn "Embed & Sign" to "Do not embedded" of each framework.

Then restart Xcode. No need to use pod update or pod disintegrate.