Unable to export for Ad Hoc or Development distribution with Xcode 13.3 RC

I was wondering if anyone else was having this issue when distributing their iOS App for Ad Hoc or Development deployment with Xcode 13.3 RC.

Xcode generates the following error 'ipatool failed with an exception' with references to 'libswift_Concurrency'.

It only seems to happen when the following is true:

  1. The App utilises Swift Concurrency
  2. The Deployment Target is set to 14.0

Disabling rebuilding with Bitcode seems to work around the issue however this is less than ideal.

Feel free to reference my feedback FB9951218 where I've attached a minimal project that reproduces the issue.

Thanks for the bug report!

Exactly same issue here. Not only does it affect Ad Hoc distribution, but for normal App Store distribution, it also receives errors.

"ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in dylib search path." (this is incorrect error message).

Unchecking "Include Bitcode for iOS content" can workaround the problem, but this cannot be applied to apps with Apple Watch applications.

Detailed error log:

ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /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/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk -o /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-out/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib --generate-dsym /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-out/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib.dSYM --strip-swift-symbols /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib
Status: pid 49600 exit 1
Stdout:
    SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk
    SDK version: 8.5
    PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
    MachoInfo: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo', '-info', '/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib']
    -= Output =-
    Non-fat file: /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib is architecture: armv7k
    Exited with 0
    
    Command took 0 seconds
    Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump
    GetUUID: cd /
     ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dwarfdump', '-u', '/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib']
    -= Output =-
    UUID: 3285553C-DF9E-38CB-84BA-C5E9E898FFDF (armv7k) /var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/ipatool20220310-49488-1r6fqqy/thinned-in/armv7k/Payload/MyApp.app/Watch/WatchApp.app/Frameworks/libswift_Concurrency.dylib
    Exited with 0
    
    ...
    
    Command took 0 seconds
    Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libobjc.A.tbd
    Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libc++.1.tbd
    Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib/libSystem.B.tbd
    Found framework/dylib: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
    Search Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/watchos, /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/usr/lib, /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS8.5.sdk/System/Library/Frameworks
    libswiftCore.tbd not found in dylib search path

Stderr:

>
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:372:in `run'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2813:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2812:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2812:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `each'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA'
    /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'

Yes I am also seeing this now with the 13.3 release.

We also cannot disable BitCode due to a WatchOS app

Facing bitcode & app thinning issues with Xcode 13.3 release. Even 13.2.1 has the issue with Bitcode. This impact is apparent since 13.3 released.

Hi all,

Engineering is aware of the issue and is working toward a resolution. Thanks for filing feedback reports so they have the information needed to investigate.

—jasonag.

This issue is also blocking the Xcode Cloud workflow.

The error log is:

Export archive for ad-hoc distribution
Command exited with non-zero exit-code: 70

Export archive for development distribution
Command exited with non-zero exit-code: 70

Same.

The same issue is observed with an app with deployment target 12.4 and without swift concurrency.

Looks Xcode 13.3.1 fixed the issue, I tested it on Xcode Cloud and both the build and deployment actions worked

Anyone else still experiencing this with Xcode 13.3.1? No difference, same error as before. Xcode 13.2 has another problem for us, so were still releasing with 13.1. FB9998962

Seeing this issue with Xcode 13.4.

Having the same issue with Xcode 13.4.

Facing the same issue here. On xcode 13.4 and targeting iOS 14.

Same problem in Xcode 13.4.1

Unable to export for Ad Hoc or Development distribution with Xcode 13.3 RC
 
 
Q