mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 15:44:24 +00:00
Update README
This commit is contained in:
@@ -88,34 +88,11 @@ To install react-native-svg on iOS visit the link referenced above or do the fol
|
|||||||
|
|
||||||
Alternatively, you can use [CocoaPods](https://cocoapods.org/) to manage your native (Objective-C and Swift) dependencies:
|
Alternatively, you can use [CocoaPods](https://cocoapods.org/) to manage your native (Objective-C and Swift) dependencies:
|
||||||
|
|
||||||
1. Add RNSVG to your Pods
|
1. Add RNSVG to your Podfile
|
||||||
```
|
```
|
||||||
pod 'RNSVG', :path => '../node_modules/react-native-svg'
|
pod 'RNSVG', :path => '../node_modules/react-native-svg'
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Add [this](https://github.com/msand/SVGPodTest/blob/fe45f88a936181e6ecaddeb68268d33268b56121/ios/Podfile#L66-L70) to the end of your Podfile
|
|
||||||
```
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
if target.name == 'yoga'
|
|
||||||
# Workaround: react-native v0.52 bug issue #17274
|
|
||||||
# node_modules/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp:208:46: Implicit conversion loses integer
|
|
||||||
# precision: 'size_type' (aka 'unsigned long') to 'const uint32_t' (aka 'const unsigned int')
|
|
||||||
# https://github.com/facebook/react-native/issues/17274#issuecomment-356363557
|
|
||||||
target.build_configurations.each do |config|
|
|
||||||
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
|
|
||||||
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if target.name == "RNSVG"
|
|
||||||
target.build_configurations.each do |config|
|
|
||||||
config.build_settings['GCC_NO_COMMON_BLOCKS'] = 'NO'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
### <a name="Usage">Usage</a>
|
### <a name="Usage">Usage</a>
|
||||||
|
|
||||||
Here's a simple example. To render output like this:
|
Here's a simple example. To render output like this:
|
||||||
|
|||||||
Reference in New Issue
Block a user