16

When I tried to create Ad Hoc IPA file. It gave "IPA processing failed" error.

Xcode version is 12.2. Mac mini (M1, 2020)

I have checked logs file: IDEDistribution.standard.log file.

Assertion failed: Expected 2 archs in otool output:
/var/folders/kd/kb03k1ks33sb33gnl9fz95yr0000gn/T/IDEDistributionOptionThinning.~~~qlv6NP/Payload/xxx.app/xxx:
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64    ARM64        ALL  0x00     EXECUTE    47       5672   NOUNDEFS DYLDLINK TWOLEVEL BINDS_TO_WEAK PIE
Load command 0
      cmd LC_SEGMENT_64

How to fix it?

yao.h yao
  • 171
  • 1
  • 1
  • 4
  • https://stackoverflow.com/a/65338460/14886224 Open XCODE with compatibility mode, this worked for me – snrddo Dec 25 '20 at 04:31

7 Answers7

21

1 open Finder--> Application

2 select Xcode----> show Info

3 use Rosetta

This worked for me

Xcode -->Build Settings -->iOS Deployment Target-->iOS 13.0 or later

This method is also possible, but I must be compatible with the lower ios version, so i use Rosetta

chun li
  • 211
  • 1
  • 2
12

Xcode -->Build Settings -->iOS Deployment Target-->iOS 13.0 or later

or

  1. Press Window > Organizer
  2. Right-click on your app > Show in Finder
  3. Right-click on first .xcarchive file > Show package contents
  4. Right-click on /Products/Applications > Show package contents
  5. Remove all lib*.dylib
  6. Re-distribute app

This worked for me.

However,I don't know why this solves the problem.

enter image description here

Vinodh
  • 5,262
  • 4
  • 38
  • 68
utena inaba
  • 121
  • 4
  • Today I had the same problem with the same setup as yao.h. Just as an additional info: My project was on deployment target iOS 10.0 (developed originally with an older Mac). Only switching to iOS 13.0 solved the problem for me. -.- Also I updated the project format to Xcode 12.0-compatible. After switching to iOS 13 I don't have a folder with *.dylib files anymore. – Sebastian Dec 04 '20 at 15:01
  • The problem some of us (me) are encountering is use of cocopods. That's where the error seems to show up, in the pods framework(s). The .dylib trick didn't work for me, but the iOS 13 target looks promising and I will try that. I have posted to the apple message boards to see if I can solicit a response from the Apple support team. This is enormously disruptive as I try to make use of the M1 based laptop for an old project. – truedat101 Jan 13 '21 at 09:00
11
  1. Go to the Application Folder
  2. Select an Xcode and press Command+I (This will open the info for Xcode)
  3. Under the General select (Open using Rosetta)
  4. Make sure you close your projects and quit Xcode then open Xcode and now you can generate the .ipa file
Mutaeb Alqahtani
  • 354
  • 4
  • 13
4

Just use Rosetta to open your Xcode. There is no relationship with the deployment target

ruby109
  • 41
  • 1
  • On a more complex build with multiple cocopods associated, I am seeing the build just hang at about 90% complete. Stuck. So while the Rosetta approach might work for some projects, it isn't working in all cases. – truedat101 Jan 13 '21 at 09:01
  • So the build hang is related to some other xcode/rosetta issue, solved by a reboot. It was getting stuck on indexing text. – truedat101 Jan 13 '21 at 18:57
  • @truedat101 When you build your app, you don't need to use Rosetta. When your app builds complete, you can close your Xcode and reopen it in Rosetta, then your can export your IPA successfully. – ruby109 Jan 18 '21 at 15:11
3

"Xcode -->Build Settings -->iOS Deployment Target-->iOS 13.0 or later". This method can solve the problem, but the minimum support system of my application is lower than 13。

-->Before the error “IPA processing failed” is prompted, during the loading process of Display “Analyzing signnature”, click the “Next” button quickly and continuously to skip the error. I don't know the reason. I hope Apple can fix the problem.

Hao Liang
  • 83
  • 3
  • There seems to be no way to unclick the bitcode checkbox when the screen pops up, but it is possible to quickly click next as described. – truedat101 Jan 13 '21 at 09:02
  • 1
    You can set this XCode to open with Rosetta,this method can solve this problem. But I feel that even if this setting is restored, the Xcode build speed becomes slower. – Hao Liang Jan 13 '21 at 10:46
  • Ahhh , very good. So the Rosetta problem I hit was it got stuck Indexing Text (or Indexing | Paused) forever. The fix for that was a reboot. Then I tried your explanation here. This was a grind to figure out. Thank you for the tip to uncheck "Rebuild from Bitcode". Agreed this will be slower each time. My app is somewhat large with all the storyboards and cocoapods. – truedat101 Jan 13 '21 at 11:23
  • Noting for the record, I did not set my project version to target iOS 13 but was able to keep it on iOS10 with the Rosetta approach + uncheck "Rebuild from Bitcode" – truedat101 Jan 13 '21 at 11:33
  • BTW this problem seems to have fixed itself in more recent XCode versions. – truedat101 Jul 26 '22 at 20:30
2

Set your minimum deployment target iOS 13.0 or later.

Siddhesh Bhide
  • 374
  • 5
  • 9
1

There are 2 solutions:

  1. Run Xcode in Rosetta mode
  • Quit Xcode completely
  • Go to finder -> Applications
  • Right Click on Xcode and select "Get Info"
  • Check Rosetta
  • Try again
  1. Upgrade Xcode to 12.5
LiveRock
  • 1,419
  • 2
  • 17
  • 27