Xcode Carthage export error ipatool failed with an exception: #<NoMethodError: undefined method `toolsPath' for nil:NillClass> , bitcode_strip failed

621 views Asked by At

I am maintaining a project using Carthage. It runs fine and archives fine. But it failed to export enterprise app. The error in "Enterprise distribution options" is

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

If skip "Enterprise distribution options" page by clicking "Next" immediately, result in another error "bitcode_strip failed".

I had searched on stackoverflow, there are many related posts, but no question is the same as my situation so I post a new question.

I followed this post Bitcode_strip failed in Xcode 8 but none of the following solutions works.

  1. Remove all derived data and clean multiple times -- not work
  2. Change Xcode version (Xcode 9.2 and Xcode 8.3) -- not work
  3. Set STRIP_BITCODE_FROM_COPIED_FILES=NO -- not work
  4. All bit-code option in build setting are set to NO -- not work
  5. Check - uncheck "Rebuild from bitcode" option -- not work

I has found an answer and hope to help those who use Carthage. Please check my answer.

Enterprise distribution options ipatool failed with an exception   NoMethodError Click "Next" before loading finish

1

There are 1 answers

0
situee On BEST ANSWER

Delete *.dSYM "in Carthage/Build/iOS" in Build Phases > Copy Bundle Resources enter image description here

Reference:

Ref(1) http://ka2n.hatenablog.com/?page=1458709290 enter image description here

Ref(2) https://twitter.com/steipete/status/725816245749166080 enter image description here

Ref(3) https://stackoverflow.com/a/34797244/111277