App Store Connect Operation Error ERROR ITMS-90087: “Unsupported architectures.
1. Reason description
the app uses dingxiangcaptchasdk.framework. An error is reported when submitting the app store
reason: dingxiangcaptchasdk.framework contains x86_ 64. I386 architecture. Of course, this app store is not allowed. All errors will be reported when uploading. The solution is to eliminate x86 from this SDK_64, i386 these two architectures
2. Solution
solution: targets – > Build Phases-> Click the plus sign to select new run script phase
to facilitate identification, double-click and rename to supported architectures [x86_64, i386].
Then copy and paste the following code:
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 ```
![Insert image description here](https://img-blog.csdnimg.cn/9d9ee5a118d2405d83e92877912eee89.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA6YOP5Zu95LiK,size_20,color_FFFFFF,t_70,g_se,x_16)