1

Running ipatool errors out.

xcrun ipatool ~/app.ipa --output=foo --info --json=foo/ipatool.info.json

It prints the following error

 "alerts": [
    {   
      "level": "ERROR",
      "type": "exception",
      "code": 1094,
      "description": "ipatool failed with an exception: #<RuntimeError: Couldn't locate otool-classic in /Applications/Xcode13.0.app/Contents/Developer/usr/bin ... /Applications/Xcode13.0.app/Contents/Developer/usr/bin/ipatool:298:in `locate_tool'\n /Applications/Xcode13.0.app/Contents/Developer/usr/bin/ipatool:2083:in `<main>'",
      "info": {
      }   
    }   
  ]

Where should I get otool-classic from. My machine has the otool that comes with the xcode toolchain.

A. K.
  • 34,395
  • 15
  • 52
  • 89

1 Answers1

2

I figure out a solution. You need to locate the tool in question and copy it in one of the directories scanned by xcrun.

Here an example:

xcrun --find otool-classic
                                          

Output:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic

Then copy it:

cp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic /Applications/Xcode.app/Contents/Developer/usr/bin

Finally, you can run your command:

xcrun ipatool --compile-bitcode -o recompiledBuil.ipa myBuild.ipa
Medhi
  • 2,656
  • 23
  • 16