Vinu Jacob
Vinu Jacob

Reputation: 381

ipatool failed with an exception: Xcode 10.1

I am developing a music player app using JWPlayer. Previously I was using iOS_SDK 2.9.1. Now I update the SDK into the new version iOS_SDK 3.5.1. After the update of SDK, I cannot able to export the .ipa file from XCode. Am getting an error message as "ipatool failed with an exception:

Please look into the screenshot of the error message as follows.

enter image description here

Upvotes: 3

Views: 1790

Answers (3)

nrudnyk
nrudnyk

Reputation: 954

In your case, you will need to wait for the fix in framework itself.

We've got similar issue, which I described here and I just wan't to share results of our investigation, because seems that no-one has published their results.

No needs to distribute without bitcode. Long story short, there were LLVM instrumentation included, which prevents AppStore processing. I've written a whole blog about XCode 12 and BigSur issues with XCFramework.

To sum up, here is a few required steps to make sure while creating XCFramework for distribution:

  • Using archive builds is a MUST, release build isn't enough
  • BUILD_LIBRARY_FOR_DISTRIBUTION must be set to YES
  • SKIP_INSTALL must be set to NO
  • GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO to turn off GCC instrumentation and remove them from the binary
  • CLANG_ENABLE_CODE_COVERAGE = NO to turn off code coverage tools from the binary

Having all of the above helped to solve our preparing and distribution problem and hopefully save you some time if you happened to face same issues as we did.

Upvotes: 1

cundyzheng
cundyzheng

Reputation: 36

If you want to build it with bitcode enabled. you can check on these steps:

  1. Remove all dependency in your project and try adding it one by one, make sure which framework causing the build error, check for newest stable version or report to the framework owner to fix the issue(should be bitcode related).

  2. Disable everything related to code coverage in your Project Scheme Test Section before building your framework for others to use.

    code coverage disabled

    1. In my case the framework was built without error, but it will generate ipatool error on .ipa archive on Project that using my framework. Been trying to solve this issue and found out that there's a line of code which causing the ipatool failed:
if (@available(iOS 10.0, *)) {

}

changed to this code solve the issue for me:

if(([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0)) {

}

Note: I'm using Xcode 11.3.1 with debug SDK 13.2 and build target iOS 9.0 with Bitcode Enabled

Upvotes: 1

swiftache
swiftache

Reputation: 70

Even I have faced the same issue after updating the pods. The fix which was worked for me is to uncheck the Bitcode option while archiving it. enter image description here

Please check the attached image

Upvotes: 2

Related Questions