LoginSignup
0
0

More than 3 years have passed since last update.

React Nativeで新しいビルドシステムを使いたい

Last updated at Posted at 2019-05-12

CocoaPodsを使っているReact Nativeプロジェクトで、Multiple commands produceというエラーが出てXcode上でプロジェクトのビルドができない時がある。
https://github.com/facebook/react-native/issues/20492
ここに書いてあるとおり、

  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

この行をPodfileに追加したら動くようになった。

pod install

も忘れずに。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0