I'm having an issue with the SVG library for React Native running on iOS simulator.
"dependencies": {
"better-fetch": "^1.1.2",
"firebase": "^4.8.1",
"lodash": "^4.17.4",
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-svg": "^6.0.1-rc.1",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
}
I have tried the following to no avail:
npm install react-native-svg --save //(again)
react-native link react-native-svg //(again)
watchman watch-del-all
rm -rf node_modules/ && yarn cache clean && yarn install
The image obviously shows that the problem is in the linking. As a result, If automatic linking does not work for you, it is possible to try manual linking. The guide for manual linking is missing for IOS devices; however, it is missing for IOS.
But you can follow the following steps for manual linking on IOS:
Open your project in XCode
go to .../node_modules/react-native-svg/ios
Locate and drag the file RNSVG.xcodeproj
, into library directory shown in XCode.
Expand the file you just added (RNSVG.xcodeproj
) until you see libRNSVG.a, it is located in RNSVG.xcodeproj > Products
)
Drag libRNSVG.a
into the Link Binary With Libraries section (located in Build Phases which may be found at the top of the XCode window)
Now you are good to go:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With