Skip to content

Commit 4b3b3f7

Browse files
committed
chore(example): apply SVGKit patch
1 parent 6c4cde3 commit 4b3b3f7

File tree

2 files changed

+5
-42
lines changed

2 files changed

+5
-42
lines changed

example/ios/Podfile

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -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
6831
end

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3128,6 +3128,6 @@ SPEC CHECKSUMS:
31283128
SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea
31293129
Yoga: 526f25666395d30c297d53154398ffd249eaf9e1
31303130

3131-
PODFILE CHECKSUM: 18d25340bc263a2eab86e2d8e5cfd9ad55ef6458
3131+
PODFILE CHECKSUM: bde9d9439b4d771442847735a4dd61175dd74cfc
31323132

31333133
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)