Duplicated Signature when archiving a multi platform project

Hey all,

I am facing a weird issue when exporting my multi platform project. The project does not make use of the multi platform targets of Xcode yet. For each "module" in the app there exists two targets, one for iOS and one for watchOS. Each of these targets link agains a binary framework that is imported via SPM.

Building works fine but as soon as I want to archive the project at the last step it complains that the Signature for the third party binary framework already exists. Which I think is a valid error message, but it seems to be a bug that the archive process either:

  • Does not override it, which would be reasonable
  • Or it should distinguish between the platforms
  • Or should just not create two signature and just have one signature file created

The error message I see

“ThirdParty.xcframework.signature” couldn’t be copied to “Signatures” because an item with the same name already exists.
Domain: NSCocoaErrorDomain Code: 516
Failure Reason: A file with the name “ThirdParty.xcframework.signature” already exists. Recovery Suggestion: To save the file, either provide a different name, or move aside or delete the existing file, and try again.

-- The operation couldn’t be completed. File exists Domain: NSPOSIXErrorDomain Code: 17 Failure Reason: File exists
-- System Information 
macOS Version 13.4.1 (Build 22F82)
Xcode 15.0 (22221.2) (Build 15A5195k)
Timestamp: 2023-07-08T12:43:57+02:00

A simplified project setup is like the following.

┌──────────────────────────────────────────────┐
│                 SPM Package                  │
│                                              │
│         ┌────────────────────────┐           │
│         │ ThirdParty.xcframework │           │
│         └────────────────────────┘           │
│                      │                       │
└──────────────────────┼───────────────────────┘
          ┌────────────┴───────────┐            
┌─────────┼────────────────────────┼───────────┐
│         │      CoreFramework     │           │
│         ▼                        ▼           │
│ ┌───────────────┐       ┌────────────────┐   │
│ │  iOS Target   │       │ watchOS Target │   │
│ └───────────────┘       └────────────────┘   │
│         │                        │           │
└─────────┼────────────────────────┼───────────┘
          │                        │            
          │                        │            
          │                        │            
          │                        ▼            
          │   Embedded in  ┌───────────────┐    
          │      (not  ┌───│  watchOS App  │    
          │   standalone)  └───────────────┘    
          │            │                        
          │            │                        
          │            │                        
          │            │                        
          ▼            │                        
 ┌─────────────────┐   │                        
 │     iOS App     │◀──┘                        
 └─────────────────┘                                  

I have the feeling it's rather a beta bug, but I wanted to ensure that's the case and its not me doing something wrong.

Does anyone know if this setup is correct or if there is something I oversee here ?

Any help is highly appreciated !

Feedback is also filed under: FB12373687

We're still seeing the problem on beta 7.

@alexanderwe This affects us on across all platforms (Mac/iOS/watchOS). We're using the same workaround on all platforms.

I can confirm that the original issue is resolved in the RC of Xcode 15 now. I can built and sign my application correctly now, building for iOS and watchOS.

We are still running into this error on the release version of Xcode 15 when archiving an iOS app for distribution—the issue is not fixed. Xcode 14 still works fine, so the problem lies in Xcode 15.

Just using this workaround with 15.0 version, and still broken in Xcode 15.1 Beta1.

Still same issue on Version 15.0.1 (15A507)

i can confirm that this issue still persists in Xcode 15

Duplicated Signature when archiving a multi platform project
 
 
Q