react-native-vector-icons: Unable to Build app due to compilation errors

I am receiving the following error while building the react-native app:

/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:95:37: error: too many arguments to block call, expected 1, have 3
        reject(@"font_load_failed", @"Font failed to load", error);
        ~~~~~~                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated

Note: I installed Vector-Icons using Cocoapods.

 pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 12
  • Comments: 19 (2 by maintainers)

Most upvoted comments

I fixed by removing pod from Podfile and added font to xcode project as described in manually install option.

Hi did you figure out the problem. I have the same

@oblador I have the same problem. I’ve created the RN project with “react-native init <project_name>” command but I’ve added the react-native-vector-icons using pods option. React native version is 0.48.3. What should I do?

@AdrianZghibarta and @Midnight-Coder, I have the same problem. Have you solved the problem?

The same issue 😦

@shinriyo

No Its not the right way.

I used to get error like as mention below. reject accept 1 argument but got 3 so this way i just pass 1 argument in reject function

This is just an hack for my solutions But its not the actual solutions for this error

I just made a hack-solution

change this

reject(@“font_load_failed”, @“Font failed to load”, error);

to

reject(error);

Same with me. Facing problem to build React App due to Semantic Error. Installed the package using Cocoapods and manually, never able to build it

Closing due to inactivity.

Hey, you need to also install ReactNative with cocoapods if you integrate RNVI with it otherwise you’d be stuck with a duplicate and old version of RN 😃