Fix ‘Multiple commands produce’ build ios

admin 1 month ago
425 favorite favorites
bookmark bookmark
share share
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
pod install

Leave a Reply

Your email address will not be published. Required fields are marked *