Xcode packaging appears ERROR ITMS-90087:Unsupported Architectures 90125, etc.

Just now I package when push Appstore, suddenly gave me the wrong ERROR ITMS-90087: Architectures. The executable for “Unsupported meichou.app/Frameworks/Hyphenate.framework contains unsupported architectures'[x86_64, i386]'”

Don’t worry when there is a problem, we just need to create a shell script to solve the problem.
specific steps as follows:

Xcode packaging appears ERROR ITMS-90087:Unsupported Architectures 90125, etc.
screen snapshot 2017-02-09 16.57.00.png

Add run Phases in Build script. In the Shell script to add it.
shell scripts are as follows

Without further ado, here s the script. Add a "Run Script step to your build steps, put it after your step to embed frameworks, set it to use /bin/sh and enter the following script: APP_PATH=" ${TARGET_BUILD_DIR}/${WRAPPER_NAME} "script loops through the # This 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_EXECUTAB LE_NAME "echo" Executable is $FRAMEWORK_EXECUTABLE_PATH "(EXTRACTED_ARCHS=) for ARCH in $ARCHS do echo Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME lipo -e Xtract "$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"

In accordance with the addition of jiuok!