ipatool failed with an exception: #<NoMethodError: undefined method `toolsPath' for nil:NillClass>

Post upgradation of Xcode to 9.0.1 version, I am experiencing an error "ipatool failed with an exception: #<NoMethodError: undefined method `toolsPath' for nil:NilClass>" while exporting as iPA in one of my project. Tried exporting other project archives and older version of same project archive, Potentially I was able to export the iPA. Bitcode is disabled in the project due to constraints in dependency framework. Read some blogs and did not find a convincing answer for this issue. Wish some one can help me understand the issue please?

Xcode version: 9.0.1

MAC OS Version: 10.13

ipatool JSON Error response:


code = 646;

description = "ipatool failed with an exception: #<NoMethodError: undefined method `toolsPath' for nil:NilClass>\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:804:in `rawLoadCommands'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:820:in `rpaths'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:259:in `resolveLoadedDylibs'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1415:in `block (2 levels) in initialize'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1414:in `each'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1414:in `block in initialize'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1413:in `each'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1413:in `initialize'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2278:in `new'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2278:in `ProcessIPA'\n /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2929:in `<main>'";

info = {


level = ERROR;

type = exception;



Is that settled?

Sort of, managed to find the problem. One of our external SDK was blocking exporting as IPA. Removed the dependency framework and bundle from the project, archived and exported the IPA successfully. I am usure of the reason exporting was disallowed only in Xcode 9 version.

SDK was quite older (Updated since a year), So planned to upgrade the SDK version and hoping to resolve the issue. Will keep posted in detail.

I had this issue fixed by updating one of my External framework used in my project which was causing the problem

  • Removed the old framework files completely from the project
  • Commented out the framework dependency code lines to avoid compilation errors
  • Archived and Exported the IPA without containing problematic framework to ensure problem is with the Framework

I am unsure on cause of this issue Since I have no control over debugging External framework, but likely an option to try out if you face this issue.

If there are more than one framework and if you are unsure of the problematic framework, try removing one after another.

Even if I removed old framework files, diabled bitcode.. I could not export distribution ipa for enterprise or even in development mode with xCode 9.1.

Finally I just clicked fast next before below red error comes, and O was able to export my ipa.. I think this is xCode 9.1s bug or what.

ipatool failed with an exception: #<NoMethodError: undefined method `toolsPath' for nil:NillClass>

I'm having the same issue but with a generated project from Unity. I can't really exclude any libraries or use an early version of Xcode because I'm using iOS 11.

Do you have any idea on what to do to fix this one?