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

Replies

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.

  • It was not an issue on the previous (12.4) version and earlier.XCFramework is created to include other frameworks by design https://help.apple.com/xcode/mac/11.4/#/dev6f6ac218b. That's weird why we have to use separate targets for this case from now on.
  • Was there any follow up since then? My team has been facing the same issue. We link the "duplicated" xcframework in both places (once in an internal library, once in the target itself). We never had an issue with this structure until 12.5 came out. We're all stuck on 12.4 for the time being, as well as our VMs & CI. We basically link it twice, but we only embed it in the main target. The internal library has the xcframework with the "Do not Embed" flag and this was working fine until 12.4.

Add a Comment

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

  • Thanks, this was my issue as well The app target was also linked as a Dependency in the test target's Build Phase tab.

  • I have similar in XCODE 13.2

    Showing Recent Messages

    Prepare build

    note: Using new build system

    note: Planning

    note: Build preparation complete

    note: Building targets in dependency order

    error: Multiple commands produce '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Products/Debug-iphoneos/TME3.app/Info.plist':

    Target 'TME3' (project 'TME3') has copy command from '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/Info.plist' to '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Products/Debug-iphoneos/TME3.app/Info.plist'Target 'TME3' (project 'TME3') has process command with output '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Products/Debug-iphoneos/TME3.app/Info.plist'

    Analyze workspace

    Create build description

    Build description signature: a3e2dffff5e1e6f499ca380b47fc32ef

    Build description path: /Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Intermediates.noindex/XCBuildData/a3e2dffff5e1e6f499ca380b47fc32ef-desc.xcbuild

    Build target TME3 of project TME3 with configuration Debug

    /Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/TME3.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/Info.plist'. (in target 'TME3' from project 'TME3')

    warning: duplicate output file '/Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Products/Debug-iphoneos/TME3.app/Info.plist' on task: ProcessInfoPlistFile /Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/DerivedData/TME3/Build/Products/Debug-iphoneos/TME3.app/Info.plist /Users/nickhunterblair/Projects/TME3/TME3/obj/Xcode/1/Info.plist (in target 'TME3' from project 'TME3')

    Build failed    06/02/2022, 00:54    1.8 seconds

Add a Comment

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.

  • Had the same issue with the same solution. Thanks!

Add a Comment