Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native iOS pod setup has duplicate target issue

I'm building an app with React Native and I have to add pod dependencies to my project. I followed a tutorial on how to init a pod with a brand new react-native init project. This is the content of my Podfile:

target 'MyProject' do

  target 'MyProject-tvOSTests' do
    inherit! :search_paths
  end

  target 'MyProjectTests' do
    inherit! :search_paths
  end

end

target 'MyProject-tvOS' do

  target 'MyProject-tvOSTests' do
    inherit! :search_paths
  end

end

Then I run pod install, and I get this error:

The target MyProject-tvOSTests is declared twice.

I think it's an issue with the react-native init but I don't know how to correct it.

Thanks in advance!

like image 745
Antoine Auffray Avatar asked Aug 04 '17 11:08

Antoine Auffray


1 Answers

Your MyProject-tvOSTests target is duplicated. Remove the first instance of it.

target 'MyProject' do

  target 'MyProjectTests' do
    inherit! :search_paths
  end

end

target 'MyProject-tvOS' do

  target 'MyProject-tvOSTests' do
    inherit! :search_paths
  end

end
like image 121
Tamás Sengel Avatar answered Sep 21 '22 04:09

Tamás Sengel