Reputation: 16190
While trying to distribute IPA, Xcode throws an error:
“IPA processing failed”
Steps:
Product -> Archive. -> Distrubute -> Enterprise/Development -> “IPA processing failed”
Xcode: Version 11.0 beta 3 (11M362v)
OS: 10.15 Beta (19A501i)
NB: I was able to take build after upgrading to Xcode 11 once, but after an additional count check in the code, from that moment i was unable to success., even i can't re-export last successfully generated archive.
Update: I think this is caused because of Some frameworks I have included in my project, at that time 3rd party framework didn't released for the new compiler. And now they released with supporting swift 5.1 & Xcode 11 compiler. So the issue is not getting anymore for me.
Upvotes: 9
Views: 8826
Reputation: 1034
Check if any of your frameworks was causing this issue in the log report my issue was happening when I used Chime SDK from Amazon
Assertion failed: Expected 4 archs in otool output:
/var/folders/gw/92tbc3ls1mgfcg8qn1gh4whh0000gr/T/IDEDistributionOptionThinning.~~~aSD3W8/Payload/telehealth.app/Frameworks/AmazonChimeSDK.framework/AmazonChimeSDK:
My solution was to not embed the framework at all.
Upvotes: 0
Reputation: 1452
Same issue I faced in Xcode 11.3. I have fixed the issue use those steps. This is working for me.
Build Phases -> plus button -> to create New Run Script Phase
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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" echo $(lipo -info
"$FRAMEWORK_EXECUTABLE_PATH")
FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp"
case "${TARGET_BUILD_DIR}" in
*"iphonesimulator")
echo "No need to remove archs"
;;
*)
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "i386") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "i386" "$FRAMEWORK_EXECUTABLE_PATH"
echo "i386 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "x86_64") ; then
lipo -output "$FRAMEWORK_TMP_PATH" -remove "x86_64" "$FRAMEWORK_EXECUTABLE_PATH"
echo "x86_64 architecture removed"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
fi
;; esac
echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH" echo $(lipo
-info "$FRAMEWORK_EXECUTABLE_PATH")
done
Upvotes: 0
Reputation: 885
I just remove WEbRTC framework from Embedded frameworks, because I was manually added WEBRTC framework from Mac installed location. After removing, project works fine and app successfully build to Apple Store Connect. I might be wrong But I think Embedded frameworks is only for the frameworks that is installed by using Carthage.
Upvotes: 1
Reputation: 3467
Same issue, same trick still in Xcode 11.1 Even if the project settings has bitcode disabled, on distributing the app it performs the check. Current workaround is to press enter as soon as that window appears, as the “Next” button has the focus, or being super fast clicking on it.
Note: When it fails, from the log the assertion failure seems to have some complaints with otools vs a certain expected number of archs for one or more 3d party frameworks. (Wonder if rebuilding those frameworks with Xcode 11+ would solve the problem without workarounds )
Update
This “approach” is still working with Xcode 11.3
Hope it helps
Upvotes: 5
Reputation: 16190
I think this is caused because of Some frameworks I have included in my project, at that time 3rd party framework didn't released for the new compiler.
And now they released with supporting swift 5.1 & Xcode 11 compiler. So the issue is not arise for me now.
Upvotes: 1
Reputation: 101
For me the following Solution Worked. Uncheck the bitcode check while creating the iPA and click on next as soon as possible and dont allow xcode to call the api for validating the IPA
Uncheck this rebuit with bitocde on and click on next asap
Upvotes: 8