oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.39k stars 2.12k forks source link

ignoring duplicated output file: #1069

Open Deg5112 opened 5 years ago

Deg5112 commented 5 years ago

Hello, it looks like with the latest React Native .60 version as well as latest vector-icons, react-native link react-native-vector-icons is mandatory. even though the latest rn version automatically links 'most' packages.

I basically get the error below because i manually linked it, and it looks like during the build process it tries to link it again make, so i get a ton of warnings about ignoring a try to make a duplicate copy of the file. if i do react-native unlink react-native-vector-icons. The warnings go away but then i get "module FontAwesome not found"

ignoring duplicated output file: ios/build/bare_rn_illum/Build/Products/Debug-iphonesimulator/bare_rn_illum.app/AntDesign.ttf' in shell script build phase '[CP] Copy Pods Resources'. This warning represents an extremely serious project misconfiguration and will likely cause some shell scripts in your project to be skipped entirely, leading to other build failures or missing files in the build directory. This will be a hard error in the future. (in target 'bare_rn_illum')

Let me know what you think

QuanticPotatoes commented 5 years ago

Same issue

rishikeshgaikar commented 4 years ago

same issue

scarlac commented 4 years ago

As of Xcode 11, this is no longer a warning but a complete blocker. Every time pod install is run, it'll re-add the font files, causing the error to occur, preventing a build altogether.

The workaround for now:

  1. Open Xcode
  2. Click your little blue project file in the Project Navigator sidebar
  3. Click the main target
  4. Click Build Phases
  5. Expand [CP] Copy Pod Resources
  6. Click and select all font files in the "Input Files" section. Do NOT remove -resources.sh file!
  7. Press "-" to remove them
  8. Click and select all font files in the "Output Files" section.
  9. Press "-" to remove them

You'll have to do this after running pod install, until the bug is fixed in this project.

Edit: I've found this comment that seems to consistently fix the issue: https://github.com/oblador/react-native-vector-icons/issues/1074#issuecomment-534053163

dbeff commented 4 years ago

In my case, after unlinking the package and adding the fonts to the Info.plist it started to work again. The autolink feature of React Native 0.6x is already provinding all fonts I just had to include on the Info.plist file as explained here.

<key>UIAppFonts</key>
<array>
  <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>Foundation.ttf</string>
  <string>Ionicons.ttf</string>
  <string>MaterialIcons.ttf</string>
  <string>MaterialCommunityIcons.ttf</string>
  <string>SimpleLineIcons.ttf</string>
  <string>Octicons.ttf</string>
  <string>Zocial.ttf</string>
</array>
lucasriondel commented 4 years ago

To anyone on 0.6x who would like to use this package, do a yarn add react-native-vector-icons && cd ios/ && pod install && cd .. then include the lines mentionned in @dbeff comments. Works like a charm !

nachten commented 4 years ago

I got the same problem ... locally everything works like a charm ... but to get it to work in my build environment using MS app center I get the error ...

I can only fix my build pipeline by manually removing the the fonts from my UIAppFonts within the Info.plist file and then do the build ...

Problem I then get is that my local environment is not working anymore ... what to do ?

danilocanalle commented 4 years ago

I still here with that problem. Always that i need to pod install, it put 2 commands to copy (/ [CP] Copy Pods Resources /) in project.pbxproj

SO I need to manually remove that lines from project.pbxproj