6

I have React Native App. And I installed react-native-vector-icons library. And after I get this error in Xcode:

Multiple commands produce '/Users/jocoders/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts':

  1. Target 'openCalls' (project 'openCalls') has copy command from '/Users/jocoders/openCalls/node_modules/react-native-vector-icons/Fonts' to '/Users/jocoders/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts'
  2. Target 'openCalls' (project 'openCalls') has copy command from '/Users/jocoders/openCalls/node_modules/react-native-vector-icons/Fonts/Fonts' to '/Users/evgeniykireev/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts'
1
  • Find out if the set library code has no duplicate. Commented Aug 8, 2019 at 5:35

4 Answers 4

12

I just had the same issue specifically with react-native-vector-icons using RN 0.61.4 and Xcode 11.2.1 while upgrading an app to > 0.6. What I ended up doing to get it to build was go to Build Phases -> [CP] Copy Pod Resources -> Deleted references to react-native-vector-icons fonts. Then rebuilt and everyone ran nicely. I did notice the fonts were already in the Resources folder on the project explorer on the left. I also commented out the # pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' line in the Podfile and ran pod install but not sure if the affected it or not. This is just a patch but hope it helps.

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

This kind of works, but the problem reappears when I run pod install again, found a permanent solution here github.com/oblador/react-native-vector-icons/issues/1074
2

Remove duplicate items from Copy bundle resources.

For ref please check image

Comments

0

I checked all links from XCode errror and have not found any dublicate files.

enter image description here

Comments

0

Instead of adding the vector icons to the Font group from XCode, adding them directly to the './ios/{app name}/Info.plist' file like shown below worked for me,

<key>UIAppFonts</key> 
<array>
    <!--Other fonts.-->
    <string>AntDesign.ttf</string>
    <string>Entypo.ttf</string>
    <string>EvilIcons.ttf</string>
    <string>Feather.ttf</string>
    <string>FontAwesome.ttf</string>
    <string>FontAwesome5_Brands.ttf</string>
    <string>FontAwesome5_Regular.ttf</string>
    <string>FontAwesome5_Solid.ttf</string>
    <string>Fontisto.ttf</string>
    <string>Foundation.ttf</string>
    <string>Ionicons.ttf</string>
    <string>MaterialCommunityIcons.ttf</string>
    <string>MaterialIcons.ttf</string>
    <string>Octicons.ttf</string>
    <string>SimpleLineIcons.ttf</string>
    <string>Zocial.ttf</string>
</array>

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.