Unable to have app signed and distributed to TestFlight in Xcode Cloud

I've noticed that, as of a couple of weeks ago (8 July 2023 for me), I'm unable to export my iOS app via Xcode Cloud for TestFlight. Locally, I'm able to build, archive, and publish normally, and Xcode Cloud can still run unit tests just fine.

I looked at some forum posts here to look for similar behaviors, but it's mixed. There was a suggestion to try removing the entitlements file, but that didn't change anything. Looking into the logs, I notice this small section (redacted sensitive information):

2023-07-15T22:36:04.870127483Z	2023-07-15 15:36:03.163 xcodebuild[6074:28093] [MT] DVTServices: No capabilities user data file found for team [REDACTED], appID Optional("[REDACTED]") and appIDType DVTPortalAppIDType(rawValue: 0)
2023-07-15T22:36:04.870197463Z	2023-07-15 15:36:03.163 xcodebuild[6074:28093] [MT] DVTServices: Platform " iOS" is provisioning with the following filtered set of entitlements, "[:]"
2023-07-15T22:36:04.914691936Z	error: exportArchive: codesign command failed (/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~LNLf0B/Root/Payload/Fedigardens.app: replacing existing signature
2023-07-15T22:36:04.914761632Z	/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~LNLf0B/Root/Payload/Fedigardens.app: Operation not permitted
2023-07-15T22:36:04.915067844Z	)
2023-07-15T22:36:04.915208428Z	
2023-07-15T22:36:04.915743970Z	DVTFoundation.DVTCodeSignerError.signingFailed("/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~LNLf0B/Root/Payload/Fedigardens.app: replacing existing signature\n/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~LNLf0B/Root/Payload/Fedigardens.app: Operation not permitted\n")
2023-07-15T22:36:04.915864076Z	

Has anyone else run into this issue recently?

My environment for Xcode Cloud:

  • Xcode Version: 15.0 beta 4
  • macOS Version: 14.0 (Sonoma) beta 2
Answered by treastrain_dev in 759805022

I am having the same problem and have temporarily changed my macOS version designation from macOS Sonoma 14 beta 2 (23A5276g) to macOS Ventura 13.4.1 (c) (22F770820d) to avoid encountering this problem.

same.

+1. I thought it was somehow related to my setup as this is the first time I've tried to use Xcode Cloud but maybe not if you had a working build with Xcode Cloud before this.

Accepted Answer

I am having the same problem and have temporarily changed my macOS version designation from macOS Sonoma 14 beta 2 (23A5276g) to macOS Ventura 13.4.1 (c) (22F770820d) to avoid encountering this problem.

Yep we are seeing this too. It's still present in Xcode beta 6 / macOS Sonoma beta 3. I filed feedback as FB12883392 if anyone wants to cross reference.

as suggested by @treastrain_dev switching the OS version to Ventura seems to resolve the issue for now for us as well, thanks for the tip.

Unable to have app signed and distributed to TestFlight in Xcode Cloud
 
 
Q