Xcode 13.3 app archive fails with error `libswiftCore.tbd not found in dylib search path`

Description of the issue

Bitrise fails to archive App with the error:

    Found framework/dylib: /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib/libobjc.A.tbd
    Found framework/dylib: /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib/libc++.1.tbd
    Found framework/dylib: /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib/libSystem.B.tbd
    Found framework/dylib: /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
    Search Path: /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/lib/darwin, /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos, /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib, /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/System/Library/Frameworks
    libswiftCore.tbd not found in dylib search path
Stderr:
>
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:372:in `run'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:2889:in `block in CompileOrStripBitcodeInBundle'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:2828:in `each'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:2828:in `CompileOrStripBitcodeInBundle'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:3115:in `block in ProcessIPA'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:3076:in `each'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:3076:in `ProcessIPA'
    /Applications/Xcode-13.3.Release.Candidate.app/Contents/Developer/usr/bin/ipatool:4038:in `<main>'}

Environment:

Where did the issue happen?

Xcode 13.3.x on macOS 12.2 (Monterey)

Which build Step causes the issue and which version of the step?

Fastlane 3.3.x

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : All the time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Update stack from Xcode 13.2.x on macOS 11.6 (Big Sur) to Xcode 13.3.x on macOS 12.2 (Monterey)

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

I’m getting the same issue as well with adhoc builds (appstore configuration works).

Same here.
Same search paths except from the Xcode filename.
Looking at the search path /Applications/Xcode-13.3.0-Release.Candidate.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/lib I find libswiftCore.tbd inside the swift directory. I’m unsure if search paths are recursive.

We have the same Problem. Is there any workaround. @amnell your right. Xcode is not looking in the path …/lib/swift for *.tbd files

Seems like Xcode 13.3 issue
https://developer.apple.com/forums/thread/702023

We need the xcode update 13.3.1:
https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3_1-release-notes

1 Like

Yes, when can expect 13.3.1 to be made available?

Hi everyone :wave: ,

Great news , we have gone ahead and released a stack update that includes Xcode 13.3.1

Please refer to this release post if needed, which includes the system report:

Thank you so much for your patience on this!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.