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.45k stars 2.12k forks source link

IOS Only: RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling. #1451

Open PopJoestar opened 2 years ago

PopJoestar commented 2 years ago

This happens on IOS when calling getImageSource or getImageSourceSync, would like to call those two without running react-native link because this command is marked as deprecated and will be removed soon. I am using react-native 0.68.2 and react-native-vector-icons 9.2.0.

jannisringwald commented 2 years ago

Same here! Running React-Native 0.69.4

kanzitelli commented 2 years ago

It has happened to me on RN 0.69.5. I've solved it by removing react-native.config.js which was created while following the steps for iOS and running pod-install (npx pod-install) again.

giordy84 commented 2 years ago

same problem. "react-native": "0.69.5", "react-native-vector-icons": "^9.2.0",

JapeshFlyFin commented 1 year ago

Facing same problem and without following changes in react-native.config.js I'm getting duplicate file error during build.

module.exports = {
   ...
  dependencies: {
    'react-native-vector-icons': {
      platforms: {
        ios: null,
      },
    },
  },
};

It has happened to me on RN 0.69.5. I've solved it by removing react-native.config.js which was created while following the steps for iOS and running pod-install (npx pod-install) again.

vito-mish commented 1 year ago
yarn add react-native-vector-icons@9.0.0

You can try this version.

tawanorg commented 1 year ago

I've resolved by change this

module.exports = {
   ...
  dependencies: {
    'react-native-vector-icons': {
      platforms: {
        ios: null,
      },
    },
  },
};

To this

module.exports = {};
cordial commented 1 year ago

Doesn't removing the config file lines then mean the fonts end up in the bundle (which you don't want)?

mccabe-david commented 1 year ago

My code was calling the loadFont() method

import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"
MaterialCommunityIcons.loadFont()

This turned out to be unnecessary for my use case, so the fix was to delete that 2nd line

import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"
gaganpreet-scalex commented 1 year ago

Is it fixed?

badalsaibo commented 10 months ago

I added this on the Podfile pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

caiogasparino commented 9 months ago

Eu adicionei isso no Podfilepod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

tks ✅ @badalsaibo

react-native-config.js

module.exports = {
   dependencies: {
      'react-native-vector-icons': {
         platforms: {
            ios: null
         }
      }
   }
}