@@ -103,9 +103,10 @@ Checkout the example app in the [example](./example) folder.
103103- ** ` GMSServices must be configured before use ` **
104104 Ensure your key is in ` Info.plist ` and/or provided via ` GMSServices.provideAPIKey(...) ` in ` AppDelegate.swift ` .
105105
106- - ** Build fails with ` Node.h ` import error from SVGKit**
107- SVGKit uses a header ` Node.h ` which can conflict with iOS system headers.
108- You can patch it automatically in your ** Podfile** inside the ` post_install ` hook:
106+ - ** Build fails with ` Node.h ` , ` CSSValue.h ` , or ` SVGLength.h ` import errors from SVGKit**
107+ SVGKit includes headers (` Node.h ` , ` CSSValue.h ` , ` SVGLength.h ` ) that can conflict with
108+ iOS system headers and React Native Reanimated’s internal types.
109+ You can patch them automatically in your ** Podfile** inside the ` post_install `
109110
110111 ``` ruby
111112 post_install do |installer |
@@ -121,14 +122,35 @@ Checkout the example app in the [example](./example) folder.
121122 end
122123 end
123124
124- # Patch SVGKit includes to avoid Node.h conflicts
125+ # --- SVGKit Patch ---
125126 require ' fileutils'
126127 svgkit_path = File .join(installer.sandbox.pod_dir(' SVGKit' ), ' Source' )
128+
129+ # node fix
127130 Dir .glob(File .join(svgkit_path, ' **' , ' *.{h,m}' )).each do |file |
128131 FileUtils .chmod(" u+w" , file)
129132 text = File .read(file)
130133 new_contents = text.gsub (' #import "Node.h"' , ' #import "SVGKit/Node.h"' )
131134 File .open (file, ' w' ) { |f | f.write(new_contents) }
135+ # puts "Patched Node import in: #{file}"
136+ end
137+
138+ # import CSSValue.h
139+ Dir .glob(File .join(svgkit_path, ' **' , ' *.{h,m}' )).each do |file |
140+ FileUtils .chmod(" u+w" , file)
141+ text = File .read(file)
142+ new_contents = text.gsub (' #import "CSSValue.h"' , ' #import "SVGKit/CSSValue.h"' )
143+ File .open (file, ' w' ) { |f | f.write(new_contents) }
144+ # puts "Patched CSSValue import in: #{file}"
145+ end
146+
147+ # import SVGLength.h
148+ Dir .glob(File .join(svgkit_path, ' **' , ' *.{h,m}' )).each do |file |
149+ FileUtils .chmod(" u+w" , file)
150+ text = File .read(file)
151+ new_contents = text.gsub (' #import "SVGLength.h"' , ' #import "SVGKit/SVGLength.h"' )
152+ File .open (file, ' w' ) { |f | f.write(new_contents) }
153+ # puts "Patched SVGLength import in: #{file}"
132154 end
133155 end
134156 ```
0 commit comments