I installed alamofire via Carthage and I am getting this error now:
Alamofire.framework contains unsupported architectures '[x86_64, i386]'
what is the problem?
please help.
Are you getting this issue when you your Uploading on AppStore or During Compile ?
If This happening during Appstore then this is the issue of Carthage /Apple
Workaround
On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
/usr/local/bin/carthage copy-frameworksand add the paths to the frameworks you want to use under “Input Files”, e.g.:
$(SRCROOT)/Carthage/Build/iOS/Alamofire.frameworkThis script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving
_Ref. from Carthage README.md_
when uploading, I have the copy-frameworks, actually I was able to upload a version before this started happening today
See this link, i figure it out this problem running this script :
http://stackoverflow.com/questions/30547283/submit-to-app-store-issues
I hope it helps
That did the trick! thanks!!
Is that a Carthage issue then?
No, i have this issue with a framework added manually. Its an apple architeture issue. This script run through all frameworks path, removing the unwanted archs.
oh! i see, thanks @joaomoraiseu ill post here the script so others can see it if the stack overflow url is gone or something:
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
@antonioreyna Where to put this code ? i m not able to create app store build and got the same type of issue.. i m working in Objective c. i have 3 framework which create issue.
can u please help me on thi
Most helpful comment
Are you getting this issue when you your Uploading on AppStore or During Compile ?
If This happening during Appstore then this is the issue of Carthage /Apple
Workaround
_Ref. from Carthage README.md_