react-native link only for one project (Android or iOS)

Aaditya Paliwal picture Aaditya Paliwal · Aug 2, 2018 · Viewed 12.4k times · Source

I want to link only one of my project (Android or iOS) with the npm package. Is there any way to do it?

Answer

Ennis Machta picture Ennis Machta · Feb 17, 2020

You can choose to link libraries for only a certain platform by doing:

For Android: react-native link (your_library_name_here) --platforms android

For iOS: react-native link (your_library_name_here) --platforms ios