
28 February 2025 Leave a comment Xcode
When submitting an app to the App Store, developers may encounter errors related to unsupported architectures, such as ERROR ITMS-90087, which indicates the presence of unsupported architectures like x86_64
and i386
in the app’s binary. This guide provides a comprehensive solution to address these issues effectively.
Understanding the Problem
The root of the problem often lies in the inclusion of simulator architectures within the app’s binary. These architectures, such as x86_64
and i386
, are meant for testing purposes on simulators and are not supported by the App Store for actual device deployment.
Solution: Removing Unsupported Architectures
To resolve this issue, you need to manually strip out the unsupported architectures from the final binary before submission. Here’s a step-by-step guide on how to do this:
Step 1: Add a Run Script Phase in Xcode
- Open your project in Xcode.
- Navigate to the Build Phases tab of your target settings.
- Click the + button and select New Run Script Phase.
- In the script area, add the following code to remove the unsupported architectures:
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
Step 2: Ensure Proper Build Settings
- Verify that your target’s build settings are configured correctly to ensure that the script is executed after embedding the frameworks.
- Make sure the script is positioned after the embed frameworks step in the build phases.
Additional Considerations
In some cases, using tools like Carthage may require additional configuration to ensure frameworks are embedded correctly. Ensure that the carthage copy-frameworks
script is executed to manage architecture slicing appropriately.
Enhancing Your Workflow with Repeato
For developers seeking to streamline their testing processes and reduce the complexity of manual configurations, Repeato offers a practical solution. With Repeato, you can leverage its no-code test automation capabilities to create, run, and maintain automated tests effortlessly. The tool’s computer vision and AI-driven approach ensure precise test execution, while features like data-driven testing and keyword-driven testing enhance flexibility and efficiency. By integrating Repeato into your development workflow, you can achieve more reliable app deployments, minimizing errors and streamlining your path to the App Store.
For more information on how Repeato can support your testing needs, visit our documentation page.
Like this article? there’s more where that came from!
- Resolving the “xcrun: error: invalid active developer path” Error on macOS
- Adding Existing Frameworks in Xcode 4: A Comprehensive Guide
- Disabling ARC for a Single File in Xcode: A Step-by-Step Guide
- Resolving the Xcode-Select Active Developer Directory Error
- Resolving the “Multiple Commands Produce” Error in Xcode 10