0

Building ipa is failing every time with me for

  • Xcode 10.2
  • iOS 10
  • Swift 5

  • I have created fresh Distribution certificates and profiles for AdHoc

  • Switched off App Thinning but still no luck.

  • Even After looking at the similar problems on multiple forums and SO post I have tried multiple tricks but result is same.

Just winding if some one out there get any Idea looking at following error message

What is wrong with this build

enter image description here

Full error message text is :

"ipatool failed with an exception: CmdSpec::NonZeroExcitException: Command exited with pid 19900 exit 1: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -o /var/folders/f4/wbk3bb9500s8527_0_ncx1r40000gn/T/ipatool20190729-17893-1r436rx/thinned-out/armv7/Payload/LanguageCurry.app/Frameworks/CardinalMobile.framework/CardinalMobile --generate-dsym /var/folders/f4/wbk3bb9500s8527_0_ncx1r40000gn/T/ipatool20190729-17893-1r436rx/thinned-out/armv7/Payload/LanguageCurry.app/Frameworks/CardinalMobile.framework/CardinalMobile.dSYM --strip-swift-symbols /var/folders/f4/wbk3bb9500s8527_0_ncx1r40000gn/T/ipatool20190729-17893-1r436rx/thinned-in/armv7/Payload/LanguageCurry.app/Frameworks/CardinalMobile.framework/CardinalMobile Stdout: Debug: SDK path: /Applications/Xcode.app/Contents/Dev"

PS : I am using following set of pods

pod 'Alamofire', '~> 4.5'
  pod 'GoogleSignIn'
  pod 'JVFloatLabeledTextField'
  pod 'Braintree'
  pod 'BraintreeDropIn'
  pod 'CTShowcase'
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'Firebase/Core'
  pod 'SwiftyStoreKit'
  pod 'OneSignal', '>= 2.6.2', '< 3.0'
swiftBoy
  • 35,607
  • 26
  • 136
  • 135

2 Answers2

0

After spending 3 days I found the solution for this problem.

The build failing due to App Thinning and Bitcode feature was not supported by some third party pods because their outdated code versions.


So I had to switch off these feature in my ipa.

Step 1. Go to project settings and switch off Enable Bitcode option

enter image description here


Step 2. Switch off App Thinning while building ipa.

enter image description here

swiftBoy
  • 35,607
  • 26
  • 136
  • 135
  • that's not really suitable, because you usually want to publish with bitcode included. Please see my answer below: https://stackoverflow.com/a/65405939/4758450 – nrudnyk Dec 22 '20 at 09:11
0

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.

nrudnyk
  • 924
  • 1
  • 7
  • 25