@@ -22,47 +22,10 @@ target 'GoogleMapsPlusExample' do
2222 )
2323
2424 post_install do |installer |
25- react_native_post_install (
26- installer ,
27- config [ :reactNativePath ] ,
28- :mac_catalyst_enabled => false ,
29- # :ccache_enabled => true
30- )
31- installer . pods_project . targets . each do |target |
32- target . build_configurations . each do |config |
33- config . build_settings [ 'IPHONEOS_DEPLOYMENT_TARGET' ] = '16.0'
34- end
35- end
25+ react_native_post_install ( installer )
3626
37- # --- SVGKit Patch ---
38- require 'fileutils'
39- svgkit_path = File . join ( installer . sandbox . pod_dir ( 'SVGKit' ) , 'Source' )
40-
41- # node fix
42- Dir . glob ( File . join ( svgkit_path , '**' , '*.{h,m}' ) ) . each do |file |
43- FileUtils . chmod ( "u+w" , file )
44- text = File . read ( file )
45- new_contents = text . gsub ( '#import "Node.h"' , '#import "SVGKit/Node.h"' )
46- File . open ( file , 'w' ) { |f | f . write ( new_contents ) }
47- # puts "Patched Node import in: #{file}"
48- end
49-
50- # import CSSValue.h
51- Dir . glob ( File . join ( svgkit_path , '**' , '*.{h,m}' ) ) . each do |file |
52- FileUtils . chmod ( "u+w" , file )
53- text = File . read ( file )
54- new_contents = text . gsub ( '#import "CSSValue.h"' , '#import "SVGKit/CSSValue.h"' )
55- File . open ( file , 'w' ) { |f | f . write ( new_contents ) }
56- # puts "Patched CSSValue import in: #{file}"
57- end
58-
59- # import SVGLength.h
60- Dir . glob ( File . join ( svgkit_path , '**' , '*.{h,m}' ) ) . each do |file |
61- FileUtils . chmod ( "u+w" , file )
62- text = File . read ( file )
63- new_contents = text . gsub ( '#import "SVGLength.h"' , '#import "SVGKit/SVGLength.h"' )
64- File . open ( file , 'w' ) { |f | f . write ( new_contents ) }
65- # puts "Patched SVGLength import in: #{file}"
66- end
27+ # Fix SVGKit imports required by react-native-google-maps-plus
28+ require_relative '../../scripts/svgkit_patch'
29+ apply_svgkit_patch ( installer )
6730 end
6831end
0 commit comments