Xcode 12.5 Multiple commands produce framework and ProcessXCFramework

Hi, I'm from the App Center SDKs team.

After updating Xcode from 12.4 to 12.5 our team faced build issues similar to this:

Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework':
1) Command: ProcessXCFramework /Users/user/appcenter-sdk-apple/AppCenter-SDK-Apple/XCFramework/AppCenter.xcframework /Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework ios simulator
2) Target 'AppCenter iOS Framework' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework'

Repro steps:

  1. Build AppCenter iOS Framework target.
  2. Build AppCenter target which creates an xcframework for iOS, macOS, and tvOS platforms.
  3. Build AppCenter iOS Framework and/or AppCenter Analytics iOS Framework target.
  4. Build SasquatchPuppet target (it uses AppCenter iOS Framework and AppCenter Analytics Framework targets).

After the issue happened only Product > Clean build folder can help.

We've tried to automate cleaning the build artifacts (BUILD_DIR) etc, but it doesn't help. Also, we've tried to use separate Product Names for XCFramework and mere Frameworks, but it was not possible for us in the end because of the xcconfig variables visibility.

Similar issue: https://developer.apple.com/forums/thread/679542

Thank for your question. Both your XCFramework and AppCenter iOS Framework target are creating the same AppCenter.framework, which results in the "Multiple commands produce /Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework" error.

You will need to downstream targets to only use one: either the target which produces the framework, or the xcframework. Both cannot be used simultaneously. Please let us know if you have any further questions.

I faced a similar issue with our own set of frameworks.

I have an application target with linked test targets. The test target has the app target linked as the Target Application under the General tab. The app target was also linked as a Dependency in the test target's Build Phase tab.

Removing the app from the Dependency list got rid of the issue. I'm not sure this would be a permanent solution however.

I also had to use the specific scheme for that test target, as opposed to using the app target as I was previously doing.

Hope this helps

I have faced the issue on Xcode 15.0.1 version due to having two files (one is a model class while the other is a view) with the same name. It was solved by deleting one file after moving the content to a newly named file. The naming issue was solved and thus, the next run worked perfectly.

Xcode 12.5 Multiple commands produce framework and ProcessXCFramework
 
 
Q