Today, after completing a demo that uses the Microsoft Oxford API to implement voice control, upload to itunes connection for an in-house test, and you get the wrong tip in the title.
Checked, this error message appears if you did not select iOS devices instead of the emulator when archive.
Another scenario is in my project: using some other structure that contains the x86_64, i386 framework.
Can be used at the terminal
$ lipo-info workspacepath/xxx.framework/xxx
command to check the frame.
The workaround is to generate binary when using a script to get rid of those unsupported structures.
Select Project->targets->build phases in Xcode to find the embed Framework.
Then in the Xcode menu bar Editor->add build phase->add Run Scrip build Phase.
The following figure:
Run Script appears below the EMBED framework.
Shell fill in:/bin/sh
Enter this script below:
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
The following figure is done:
then re-archive.
I was searching for this question, refer to here:
http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/#n1
Above.