React-native link doesn't work when you have CocoaPods in your project
See original GitHub issueNote: If your iOS project is using CocoaPods (contains Podfile) and linked library has podspec file, then react-native link will link library using Podfile.
Source: https://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-2
The automatic linking with react-native link react-native-svg
doesn’t work however if you have a Podfile in your project. I get errors like
Warning: Native component for "RNSVGSvgView" does not exist
or
No component found for view with name "RNSVGPath"
when I try to render svgs.
When I manually link the react-native-svg packages, by following the first two stepts here (https://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking), the errors go away and everything works fine.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
React-native link doesn't work when you have CocoaPods in ...
I'm experiencing the same exact problem. The libraries folder doesn't include the necessary code, probably cocoapods couldn't find the header ...
Read more >Resolving CocoaPods issues in React Native project - Medium
The goal of this blog is to provide steps to help you resolve commonly faced issues related to CocoaPods in React Native projects....
Read more >Error: Failed to install CocoaPods dependencies for iOS ...
Try to open up Xcode, and it will ask to install the required dependencies/component for it to work (usually due to some update);...
Read more >Troubleshooting - React Native
If you added React Native manually to your project, make sure you have included all the relevant dependencies that you are using, like...
Read more >How to add React Native to an existing iOS app in 2022 - Fek.io
React Native uses Cocoapods to add iOS dependencies when you add new modules to your application. Cocoapods is a dependency manager for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@petrogad I just ran into this as well, adding
pod 'RNSVG', :path => '../node_modules/react-native-svg'
to my podfile and letting CocoaPods handle it solved it for me.@petrogad Try adding this to the end of your Podfile: