9

While trying to distribute IPA, Xcode throws an error:

“IPA processing failed”

Steps:

Product -> Archive. -> Distrubute -> Enterprise/Development -> “IPA processing failed”

enter image description here

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.

Lal Krishna
  • 15,485
  • 6
  • 64
  • 84

6 Answers6

8

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 Rebuild from xcode - uncheck this option

  • But what if my App supports iPad and iPhone? – Lal Krishna Sep 18 '19 at 06:37
  • my app failed during app thinning. Still digging around that. – Tonny Xu Oct 02 '19 at 10:09
  • 1
    when creating the IPA.. uncheck the bitcode option and try to click the next asap. Dont let the xcode to call the api to validate the iPA – Boopathi Marappan Oct 03 '19 at 11:05
  • Happy to know that, this solution worked for you. For me is different. I've updated in the question. And i don't have error anymore. Anyway thanks for your answer. I've upvoted your answer for your effort. I will accept this answer once this get more upvotes. – Lal Krishna Oct 10 '19 at 06:28
5

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

Luca Iaco
  • 3,387
  • 1
  • 19
  • 20
1

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.

Lal Krishna
  • 15,485
  • 6
  • 64
  • 84
1

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.

enter image description here

Ahtazaz
  • 903
  • 8
  • 21
0

Same issue I faced in Xcode 11.3. I have fixed the issue use those steps. This is working for me.

enter image description here

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
Vukašin Manojlović
  • 3,717
  • 3
  • 19
  • 31
Dilip Mishra
  • 1,422
  • 13
  • 17
0

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.

Mahi Tej Gvp
  • 984
  • 1
  • 14
  • 34