Update README

This commit is contained in:
Mikael Sand
2018-02-13 19:55:49 +02:00
parent 1e7586037c
commit 7cc77bb1d1
+1 -24
View File
@@ -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: