Reputation: 26416
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'
Upvotes: 13
Views: 8356
Reputation: 506
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. :)
Upvotes: 0
Reputation: 2184
You can change the Build System to Legacy
and try rebuild:
File => Workspace Settings => Build System => Legacy Build System
Upvotes: 0
Reputation: 21
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
Upvotes: 2
Reputation: 29602
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
Upvotes: 1
Reputation: 521
You can try to change the build system to Legacy
File > Workspace Settings > Build System > Legacy Build System.
Upvotes: 6