Services Plugins FAQs

Native iOS - Failure Uploading to App Store - Unsupported Architectures

Hey,

I wanted to share a problem and and a solution with you.

I wanted to update my app and used the newest version of the Native iOS WebView. Did not change anything from the template except Name, ID and some config parameters.
Seems like the template simulator stuff at the release build.

Got this Error
App Store Connect Operation Error
ERROR ITMS-90087: "Unsupported Architectures.

App Store Connect Operation Error
ERROR ITMS-90209: "Invalid Segment Alignment.

App Store Connect Operation Error
ERROR ITMS-90125: "The binary is invalid.

App Store Connect Operation Warning
WARNING ITMS-90080: "The executable ‘Payload/Haus-Guru.app/Frameworks/SuperViewCore.framework’ is not a Position Independent Executable.

Used the solution with an additional script for the build from here https://github.com/usabilla/usabilla-u4a-react-native/issues/26

if [ “${CONFIGURATION}” = “Release” ]; then

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

fi

1 Like