Reference Links:
http://www.jianshu.com/p/60ac3ded34a0
http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/
Cause: Contains the emulator content
Error message:
ERROR ITMS-90087: "Unsupported architectures." The executable for ***.app/frameworks/sdk.framework contains unsupported architectures ' [x86_64, i386] '."ERROR ITMS-90362: "Invalid info.plist value. The value for the key ' minimumosversion ' in bundles ***.app/frameworks/sdk.framework is invalid. The minimum value is 8.0 "ERROR ITMS-90209:" Invalid Segment Alignment. The app binary at ' ***.app/frameworks/sdk.framework/sdk ' does does have proper segment alignment. Try rebuilding the app with the latest Xcode version. " ERROR ITMS-90125: "The binary is invalid. The encryption info in the Lc_encryption_info load command was either missing or invalid, or the binary is already encrypte D. This binary does not seem to the been built with Apple's linker.
Solution:
1. Upload an app using a framework that doesn't include an emulator
2. Add a Run script
Build Phases Click Add Run Script
Input script:
App_path="${target_build_dir}/${wrapper_name}"# This script loops through the frameworks embeddedinchThe application and# removes unused architectures.Find "$APP _path"-name'*.framework'-type D | whileRead-R FRAMEWORK DoFramework_executable_name=$ (Defaults read"$FRAMEWORK/info.plist"cfbundleexecutable) Framework_executable_path="$FRAMEWORK/$FRAMEWORK _executable_name"Echo "executable is $FRAMEWORK _executable_path"Extracted_archs=() forARCHinch$ARCHS DoEcho "extracting $ARCH from $FRAMEWORK _executable_name"Lipo-extract"$ARCH" "$FRAMEWORK _executable_path"-O"$FRAMEWORK _executable_path-$ARCH"Extracted_archs+=("$FRAMEWORK _executable_path-$ARCH") DoneEcho "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
Self-encapsulated Framworks upload to App Store error