Skip to content

Commit cee0708

Browse files
committed
fix(example): build issues
1 parent 73c997c commit cee0708

File tree

3 files changed

+33
-9
lines changed

3 files changed

+33
-9
lines changed

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ android {
8585
targetSdkVersion rootProject.ext.targetSdkVersion
8686
versionCode 1
8787
versionName "1.0"
88+
multiDexEnabled true
8889
}
8990
signingConfigs {
9091
debug {

example/ios/Podfile

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,36 @@ target 'GoogleMapsPlusExample' do
3333
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
3434
end
3535
end
36-
require 'fileutils'
37-
svgkit_path = File.join(installer.sandbox.pod_dir('SVGKit'), 'Source')
38-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
39-
FileUtils.chmod("u+w", file)
40-
text = File.read(file)
41-
new_contents = text.gsub('#import "Node.h"', '#import "SVGKit/Node.h"')
42-
File.open(file, 'w') { |f| f.write(new_contents) }
43-
end
36+
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
4467
end
4568
end

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3094,6 +3094,6 @@ SPEC CHECKSUMS:
30943094
SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea
30953095
Yoga: ce55ebb197c21e22b6700cd36e3f36b7ec26e6f8
30963096

3097-
PODFILE CHECKSUM: ada9cd8bbcd5ad8a6a2eae598262b8f8bce77633
3097+
PODFILE CHECKSUM: 246331f3f9b61838ac0bd43aa0f04db450c4bd52
30983098

30993099
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)