Error on archiving react native app in Xcode - Multiple commands produce 'libyoga.a'










6















I get an error when I try to archive my react native app using release configurations in Xcode - Target 'yoga' (libyoga.a)



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


How to resolve this in the new build system?










share|improve this question






















  • Did you ever solve this?

    – Tall Paul
    Jan 17 at 0:06















6















I get an error when I try to archive my react native app using release configurations in Xcode - Target 'yoga' (libyoga.a)



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


How to resolve this in the new build system?










share|improve this question






















  • Did you ever solve this?

    – Tall Paul
    Jan 17 at 0:06













6












6








6


0






I get an error when I try to archive my react native app using release configurations in Xcode - Target 'yoga' (libyoga.a)



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


How to resolve this in the new build system?










share|improve this question














I get an error when I try to archive my react native app using release configurations in Xcode - Target 'yoga' (libyoga.a)



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


How to resolve this in the new build system?







ios xcode reactjs react-native testflight






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 5:18









MatheswaaranMatheswaaran

727




727












  • Did you ever solve this?

    – Tall Paul
    Jan 17 at 0:06

















  • Did you ever solve this?

    – Tall Paul
    Jan 17 at 0:06
















Did you ever solve this?

– Tall Paul
Jan 17 at 0:06





Did you ever solve this?

– Tall Paul
Jan 17 at 0:06












1 Answer
1






active

oldest

votes


















1














If I may make some assumptions, you are using react-native (libyoga is referenced), you are using the new build system from XCode 10+ (not the legacy system) and you have integrated CocoaPods (likely to use Firebase or similar).



Please correct me if I am wrong, but that's my setup, and that's what produced this error for me.



You have three options in increasing order of effort and correctness.



First, you can get moving this moment with no effort by just ignoring/hiding the problem by switching your build to the Legacy Build System[1]:



1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.


Second, you can get moving with the new XCode build system with a little effort if you add a workaround snippet[2] in your Podfile until the problem is fixed upstream in react-native or Cocoapods. I am doing this now and my project successfully archives:



 post_install do |installer|
installer.pods_project.targets.each do |target|

# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"

targets_to_ignore = %w(React yoga)

if targets_to_ignore.include? target.name
target.remove_from_project
end

end
end


(then as @jules-randolph points out - you must run a pod install in your iOS folder to start using the Podfile changes you made)



Third, you can do the work to completely convert your project to Pods by removing any left over references to react-native frameworks in your project (as opposed to the workspace configred by Pods).[3]. I have not done this yet but it is the correct thing to do and closed the upstream issue.



References, and note the parent issue in general is useful



[1] https://github.com/facebook/react-native/issues/20492#issuecomment-422958184



[2] https://github.com/facebook/react-native/issues/20492#issuecomment-409599358



[3] https://github.com/facebook/react-native/issues/20492#issuecomment-464343895






share|improve this answer

























  • @Matheswaaran have you examined this? I am curious if my answer suits you

    – Mike Hardy
    Mar 27 at 14:36






  • 1





    You forgot to mention to run pod install from ios folder after editing Podfile!

    – Jules Randolph
    2 days ago











  • Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

    – Mike Hardy
    2 days ago











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312887%2ferror-on-archiving-react-native-app-in-xcode-multiple-commands-produce-libyog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














If I may make some assumptions, you are using react-native (libyoga is referenced), you are using the new build system from XCode 10+ (not the legacy system) and you have integrated CocoaPods (likely to use Firebase or similar).



Please correct me if I am wrong, but that's my setup, and that's what produced this error for me.



You have three options in increasing order of effort and correctness.



First, you can get moving this moment with no effort by just ignoring/hiding the problem by switching your build to the Legacy Build System[1]:



1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.


Second, you can get moving with the new XCode build system with a little effort if you add a workaround snippet[2] in your Podfile until the problem is fixed upstream in react-native or Cocoapods. I am doing this now and my project successfully archives:



 post_install do |installer|
installer.pods_project.targets.each do |target|

# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"

targets_to_ignore = %w(React yoga)

if targets_to_ignore.include? target.name
target.remove_from_project
end

end
end


(then as @jules-randolph points out - you must run a pod install in your iOS folder to start using the Podfile changes you made)



Third, you can do the work to completely convert your project to Pods by removing any left over references to react-native frameworks in your project (as opposed to the workspace configred by Pods).[3]. I have not done this yet but it is the correct thing to do and closed the upstream issue.



References, and note the parent issue in general is useful



[1] https://github.com/facebook/react-native/issues/20492#issuecomment-422958184



[2] https://github.com/facebook/react-native/issues/20492#issuecomment-409599358



[3] https://github.com/facebook/react-native/issues/20492#issuecomment-464343895






share|improve this answer

























  • @Matheswaaran have you examined this? I am curious if my answer suits you

    – Mike Hardy
    Mar 27 at 14:36






  • 1





    You forgot to mention to run pod install from ios folder after editing Podfile!

    – Jules Randolph
    2 days ago











  • Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

    – Mike Hardy
    2 days ago















1














If I may make some assumptions, you are using react-native (libyoga is referenced), you are using the new build system from XCode 10+ (not the legacy system) and you have integrated CocoaPods (likely to use Firebase or similar).



Please correct me if I am wrong, but that's my setup, and that's what produced this error for me.



You have three options in increasing order of effort and correctness.



First, you can get moving this moment with no effort by just ignoring/hiding the problem by switching your build to the Legacy Build System[1]:



1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.


Second, you can get moving with the new XCode build system with a little effort if you add a workaround snippet[2] in your Podfile until the problem is fixed upstream in react-native or Cocoapods. I am doing this now and my project successfully archives:



 post_install do |installer|
installer.pods_project.targets.each do |target|

# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"

targets_to_ignore = %w(React yoga)

if targets_to_ignore.include? target.name
target.remove_from_project
end

end
end


(then as @jules-randolph points out - you must run a pod install in your iOS folder to start using the Podfile changes you made)



Third, you can do the work to completely convert your project to Pods by removing any left over references to react-native frameworks in your project (as opposed to the workspace configred by Pods).[3]. I have not done this yet but it is the correct thing to do and closed the upstream issue.



References, and note the parent issue in general is useful



[1] https://github.com/facebook/react-native/issues/20492#issuecomment-422958184



[2] https://github.com/facebook/react-native/issues/20492#issuecomment-409599358



[3] https://github.com/facebook/react-native/issues/20492#issuecomment-464343895






share|improve this answer

























  • @Matheswaaran have you examined this? I am curious if my answer suits you

    – Mike Hardy
    Mar 27 at 14:36






  • 1





    You forgot to mention to run pod install from ios folder after editing Podfile!

    – Jules Randolph
    2 days ago











  • Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

    – Mike Hardy
    2 days ago













1












1








1







If I may make some assumptions, you are using react-native (libyoga is referenced), you are using the new build system from XCode 10+ (not the legacy system) and you have integrated CocoaPods (likely to use Firebase or similar).



Please correct me if I am wrong, but that's my setup, and that's what produced this error for me.



You have three options in increasing order of effort and correctness.



First, you can get moving this moment with no effort by just ignoring/hiding the problem by switching your build to the Legacy Build System[1]:



1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.


Second, you can get moving with the new XCode build system with a little effort if you add a workaround snippet[2] in your Podfile until the problem is fixed upstream in react-native or Cocoapods. I am doing this now and my project successfully archives:



 post_install do |installer|
installer.pods_project.targets.each do |target|

# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"

targets_to_ignore = %w(React yoga)

if targets_to_ignore.include? target.name
target.remove_from_project
end

end
end


(then as @jules-randolph points out - you must run a pod install in your iOS folder to start using the Podfile changes you made)



Third, you can do the work to completely convert your project to Pods by removing any left over references to react-native frameworks in your project (as opposed to the workspace configred by Pods).[3]. I have not done this yet but it is the correct thing to do and closed the upstream issue.



References, and note the parent issue in general is useful



[1] https://github.com/facebook/react-native/issues/20492#issuecomment-422958184



[2] https://github.com/facebook/react-native/issues/20492#issuecomment-409599358



[3] https://github.com/facebook/react-native/issues/20492#issuecomment-464343895






share|improve this answer















If I may make some assumptions, you are using react-native (libyoga is referenced), you are using the new build system from XCode 10+ (not the legacy system) and you have integrated CocoaPods (likely to use Firebase or similar).



Please correct me if I am wrong, but that's my setup, and that's what produced this error for me.



You have three options in increasing order of effort and correctness.



First, you can get moving this moment with no effort by just ignoring/hiding the problem by switching your build to the Legacy Build System[1]:



1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.


Second, you can get moving with the new XCode build system with a little effort if you add a workaround snippet[2] in your Podfile until the problem is fixed upstream in react-native or Cocoapods. I am doing this now and my project successfully archives:



 post_install do |installer|
installer.pods_project.targets.each do |target|

# The following is needed to ensure the "archive" step works in XCode.
# It removes React & Yoga from the Pods project, as it is already included in the main project.
# Without this, you'd see errors when you archive like:
# "Multiple commands produce ... libReact.a"
# "Multiple commands produce ... libyoga.a"

targets_to_ignore = %w(React yoga)

if targets_to_ignore.include? target.name
target.remove_from_project
end

end
end


(then as @jules-randolph points out - you must run a pod install in your iOS folder to start using the Podfile changes you made)



Third, you can do the work to completely convert your project to Pods by removing any left over references to react-native frameworks in your project (as opposed to the workspace configred by Pods).[3]. I have not done this yet but it is the correct thing to do and closed the upstream issue.



References, and note the parent issue in general is useful



[1] https://github.com/facebook/react-native/issues/20492#issuecomment-422958184



[2] https://github.com/facebook/react-native/issues/20492#issuecomment-409599358



[3] https://github.com/facebook/react-native/issues/20492#issuecomment-464343895







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered Mar 24 at 20:26









Mike HardyMike Hardy

2314




2314












  • @Matheswaaran have you examined this? I am curious if my answer suits you

    – Mike Hardy
    Mar 27 at 14:36






  • 1





    You forgot to mention to run pod install from ios folder after editing Podfile!

    – Jules Randolph
    2 days ago











  • Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

    – Mike Hardy
    2 days ago

















  • @Matheswaaran have you examined this? I am curious if my answer suits you

    – Mike Hardy
    Mar 27 at 14:36






  • 1





    You forgot to mention to run pod install from ios folder after editing Podfile!

    – Jules Randolph
    2 days ago











  • Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

    – Mike Hardy
    2 days ago
















@Matheswaaran have you examined this? I am curious if my answer suits you

– Mike Hardy
Mar 27 at 14:36





@Matheswaaran have you examined this? I am curious if my answer suits you

– Mike Hardy
Mar 27 at 14:36




1




1





You forgot to mention to run pod install from ios folder after editing Podfile!

– Jules Randolph
2 days ago





You forgot to mention to run pod install from ios folder after editing Podfile!

– Jules Randolph
2 days ago













Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

– Mike Hardy
2 days ago





Thanks @JulesRandolph you are right and that's a step that's easy to forget if you are new to CocoaPods (like myself)

– Mike Hardy
2 days ago



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312887%2ferror-on-archiving-react-native-app-in-xcode-multiple-commands-produce-libyog%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo