13
votes

I'm getting the errors below when trying to archive the app. Any idea how to resolve this?

:-1: Multiple commands produce '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a': 1) Target 'yoga' has a command with output '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a' 2) Target 'yoga' has a command with output '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a'

:-1: Multiple commands produce '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a': 1) Target 'React' has a command with output '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a' 2) Target 'React' has a command with output '/Users/gb/Library/Developer/Xcode/DerivedData/GB-ggeaxhzkqxunxvenbvbwxczukaqb/Build/Intermediates.noindex/ArchiveIntermediates/GB/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReact.a'

5
I have the same issue. Did you resolve it?bkit4u

5 Answers

6
votes

You can try to change the build system to Legacy

File > Workspace Settings > Build System > Legacy Build System.

2
votes

I am using Cocoapods installing depedencies for google map ios and get the same error with duplicate libyoga.a and libReact.a.

It is fix by adding to Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end

    if target.name == "yoga"
      target.remove_from_project
    end
  end
end

Then reinstall pod.

Thanks to Senke post: https://stackoverflow.com/a/54338797/8143857

1
votes

If you're using CocoaPods, have this problem, and don't want to change to the Legacy Build System:

Make sure that the subspec combinations of any extension targets are also included in their host app. Examine the Podfile.lock to investigate and make appropriate adjustments to the Podfile.

The CocoaPods team is investigating a better solution.

Detailed discussion at https://github.com/CocoaPods/CocoaPods/issues/8206

0
votes

You can change the Build System to Legacy and try rebuild: File => Workspace Settings => Build System => Legacy Build System

0
votes

Had the same problem, and now I finally found a fix!

I tried to remove the yoga target in the Podfile's post_install step, as jtian suggested:

if target.name == "yoga"
  target.remove_from_project
end

This didn't work though, because then I got a linker error that said Yoga couldn't be found... so I scrapped that.

The fix was that I found some duplicate font references in the XCode project. I removed the duplicates and that fixed it. :)