react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

Add autolinking compatibility for RN >=0.60.0

Open Matiyeu opened this issue 6 years ago • 50 comments

Hello Could you add support for autolinking for RN >=0.60.0 please thanks! https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

Matiyeu avatar Jul 13 '19 17:07 Matiyeu

I think you also need to upgrade two variables for Android:

compileSdkVersion 28
buildToolsVersion "28.0.1"

For those who can't upgrade to RN 0.60 ATM, you can use npm patch package to patch the module

qlerebours avatar Jul 15 '19 08:07 qlerebours

I think you also need to upgrade two variables for Android:

compileSdkVersion 28
buildToolsVersion "28.0.1"

For those who can't upgrade to RN 0.60 ATM, you can use npm patch package to patch the module

It'll automatically use the correct compileSdkVersion and buildToolsVersion so you don't have to ptach for those. The only thing this project needs to have auto-linking added is the automatic inclusion of

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

somehow.

StefanDorresteijn avatar Jul 15 '19 14:07 StefanDorresteijn

Yes I know @StefanDorresteijn but I had to do it manually to make it work. Same on ios..

Matiyeu avatar Jul 16 '19 00:07 Matiyeu

+1

IntelliJAbhishek avatar Jul 17 '19 05:07 IntelliJAbhishek

+27

craig8two avatar Jul 17 '19 10:07 craig8two

@Matiyeu , how did you manually get this to work?

craig8two avatar Jul 17 '19 12:07 craig8two

At least for iOS this https://github.com/oblador/react-native-vector-icons/issues/1035#issuecomment-508645612 worked for me.

davincho avatar Jul 17 '19 16:07 davincho

Is anyone looking into this? I am not able to upgrade my RN project to the latest 0.60.x due to just this dependency and I don't want to do it manually.

barunprasad avatar Jul 20 '19 06:07 barunprasad

+1

devrdias avatar Jul 20 '19 15:07 devrdias

I think you also need to upgrade two variables for Android:

compileSdkVersion 28
buildToolsVersion "28.0.1"

For those who can't upgrade to RN 0.60 ATM, you can use npm patch package to patch the module

It'll automatically use the correct compileSdkVersion and buildToolsVersion so you don't have to ptach for those. The only thing this project needs to have auto-linking added is the automatic inclusion of

This doesn't seem to work correctly. Was getting build errors about missing v28 resources (/node_modules/react-native-vector-icons/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.)

My project build.gradle is:

compileSdkVersion 28
buildToolsVersion "28.0.3"

Manually edited this package's build.gradle to match: (node_modules/react-native-vector-icons/android/build.gradle)

compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion "28.0.3"

and it started building correctly. Will probably explore npm patch package mentioned above in the meantime...

whiskeyseven avatar Jul 23 '19 18:07 whiskeyseven

look forward to autolink

vinurs avatar Jul 24 '19 10:07 vinurs

+1

doponalopes avatar Jul 25 '19 21:07 doponalopes

autolinking doesn't work in case of RN 60.4 ,Please add support for autolinking

piashcse avatar Jul 26 '19 08:07 piashcse

+1

tux2nicolae avatar Jul 26 '19 09:07 tux2nicolae

+1

stanka-n avatar Jul 26 '19 13:07 stanka-n

+1. I'm trying to use RN >= 0.60 using pods instead but not work, I am facing this issue: ExceptionsManager.js:86 $RefreshReg$ is not defined

leandrolimasi avatar Jul 26 '19 19:07 leandrolimasi

You need to follow below steps in order to work with RN>=0.60 I have tested it in RN 0.60.4 and it will work smoothly.

yarn add react-native-vector-icons

Now navigate to ios folder and run

pod install

Now back to root folder and create a file named react-native.config.js in root of your project and add below code in this file,

module.exports = {
    assets: ['react-native-vector-icons']
};

And finally run;

yarn react-native link

Now you are ready to use react-native-vector-icon

Happy coding 😺

Ravi448 avatar Jul 27 '19 10:07 Ravi448

For me it worked that way but I had to auto link yet. thank you @Ravi448

doponalopes avatar Jul 27 '19 13:07 doponalopes

hello guys follow this one for ios : https://medium.com/@vimniky/how-to-use-vector-icons-in-your-react-native-project-8212ac6a8f06 For android I just solved the issue using: apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" this line paste into android/app/build.gradle(app). then re-run android.

piashcse avatar Jul 28 '19 10:07 piashcse

fixed, thanks everyone

leandrolimasi avatar Jul 29 '19 01:07 leandrolimasi

After running react-native link react-native-vector-icons, I needed to remove all the fonts from Copy Bundle Resources from your XCode project to run on iOS, Build Phases should look like this

Screenshot at Aug 07 10-05-07

durdevic avatar Aug 07 '19 08:08 durdevic

is there any plan that when to support autolink?

vinurs avatar Aug 13 '19 05:08 vinurs

+1

joaodematejr avatar Aug 15 '19 19:08 joaodematejr

+1

RatebSeirawan avatar Aug 19 '19 10:08 RatebSeirawan

+1

nickfla1 avatar Aug 20 '19 16:08 nickfla1

+1

MrHazimAli avatar Aug 26 '19 17:08 MrHazimAli

+1

alexfoxy avatar Sep 02 '19 10:09 alexfoxy

+1

laurenzfg avatar Sep 02 '19 13:09 laurenzfg

Is anyone working on autolinking feature?

a-c-sreedhar-reddy avatar Sep 12 '19 04:09 a-c-sreedhar-reddy

Auto linking worked for me, i'm using rn 0.60.5

aniciom avatar Sep 14 '19 01:09 aniciom