Embed Pods Fails with Xcode 12.5

We use fastlane to build and archive our projects in CircleCI. With the introduction of xcode 12.5 however, our archiving has been failing due to the error below. We archive the app using build_ios_app action in fastane. In CircleCI this works fine when using xcode 12.4. And building/scanning our app using fastlane action scan works fine in both versions.

▸ Generating 'XXXXX.app.dSYM'
▸ Running script '[CP] Embed Pods Frameworks'
** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/distiller/Library/Developer/Xcode/DerivedData/xxxxxxx-aadtujgjbmuouifqwwlhvxepovuv/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/xxxxxx.build/QA_Dev-iphoneos/xxxxxx.build/Script-289F466B4090F9D6DC2C41F6.sh
(1 failure)
[15:39:59]: Exit status: 65
[15:39:59]: 
[15:39:59]: Maybe the error shown is caused by using the wrong version of Xcode
[15:39:59]: Found multiple versions of Xcode in '/Applications/'
[15:39:59]: Make sure you selected the right version for your project
[15:39:59]: This build process was executed using '/Applications/Xcode-12.5.app'

And the Build Environment:

+---------------+------------------------------+
|              Build environment               |
+---------------+------------------------------+
| xcode_path    | /Applications/Xcode-12.5.app |
| gym_version   | 2.150.3                      |
| export_method | ad-hoc                       |
| sdk           | iPhoneOS14.5.sdk             |
+---------------+------------------------------+
1 Like