Skip to content

ERROR ITMS-90087: "Unsupported Architectures #10

@Allan-Nava

Description

@Allan-Nava

I have this problem when I i try to upload the Archive Release.

ERROR ITMS-90087: "Unsupported Architectures. The executable for Sportube.app/Frameworks/GoogleCast.framework contains unsupported architectures '[x86_64, i386]'."

But I use a Run Script in Pre-Actions:

#!/bin/bash

# This script strips unused architectures from any frameworks embedded in an
# app bundle. It should be called from an Xcode project as a post-build step.

if [ -z "${TARGET_BUILD_DIR}" ]; then
  echo "This script should be invoked from an Xcode project."
  exit 1
fi

app_dir="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

framework_dirs=($(find "${app_dir}" -type d -name '*.framework'))
for framework_dir in "${framework_dirs[@]}"; do
  framework_name=$(defaults read "${framework_dir}/Info.plist" CFBundleExecutable)

  if [ !-z "$framework_name" ]; then
    framework_path="${framework_dir}/${framework_name}"

    echo "Removing unused architectures from framework: ${framework_name}"

    slice_paths=()
    for arch in ${ARCHS}; do
      slice_path="${framework_path}_${arch}"
      lipo "${framework_path}" -extract "${arch}" -output "${slice_path}"
      slice_paths+=("${slice_path}")
    done

    lipo "${slice_paths[@]}" -create -output "${framework_path}_thinned"
    rm -f "${slice_paths[@]}"

    rm -f "${framework_path}"
    mv "${framework_path}_thinned" "${framework_path}"
  fi
   
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions