Skip to content

Commit 7146ef3

Browse files
authored
chore: merge dev into main
2 parents b051d45 + 3af6fa6 commit 7146ef3

File tree

13 files changed

+185
-186
lines changed

13 files changed

+185
-186
lines changed

.github/workflows/pull_request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,10 @@ jobs:
112112
- name: Create Secrets.xcconfig
113113
run: echo MAPS_API_KEY="API_KEY" >> example/ios/Secrets.xcconfig
114114

115+
- name: Install iOS Simulator runtime
116+
run: |
117+
sudo xcodebuild -runFirstLaunch
118+
sudo xcodebuild -downloadPlatform iOS
119+
115120
- name: Build example for iOS
116121
run: yarn build:ios

README.md

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,47 +25,14 @@ Add this to your Podfile only for bare React Native apps.
2525
```ruby
2626
post_install do |installer|
2727
react_native_post_install(
28-
installer,
29-
config[:reactNativePath],
30-
:mac_catalyst_enabled => false,
31-
)
32-
# Force iOS 16+ to avoid deployment target warnings
33-
installer.pods_project.targets.each do |target|
34-
target.build_configurations.each do |config|
35-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
36-
end
37-
end
38-
39-
# --- SVGKit Patch ---
40-
require 'fileutils'
41-
svgkit_path = File.join(installer.sandbox.pod_dir('SVGKit'), 'Source')
42-
43-
# node fix
44-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
45-
FileUtils.chmod("u+w", file)
46-
text = File.read(file)
47-
new_contents = text.gsub('#import "Node.h"', '#import "SVGKit/Node.h"')
48-
File.open(file, 'w') { |f| f.write(new_contents) }
49-
# puts "Patched Node import in: #{file}"
50-
end
51-
52-
# import CSSValue.h
53-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
54-
FileUtils.chmod("u+w", file)
55-
text = File.read(file)
56-
new_contents = text.gsub('#import "CSSValue.h"', '#import "SVGKit/CSSValue.h"')
57-
File.open(file, 'w') { |f| f.write(new_contents) }
58-
# puts "Patched CSSValue import in: #{file}"
59-
end
60-
61-
# import SVGLength.h
62-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
63-
FileUtils.chmod("u+w", file)
64-
text = File.read(file)
65-
new_contents = text.gsub('#import "SVGLength.h"', '#import "SVGKit/SVGLength.h"')
66-
File.open(file, 'w') { |f| f.write(new_contents) }
67-
# puts "Patched SVGLength import in: #{file}"
68-
end
28+
installer,
29+
config[:reactNativePath],
30+
:mac_catalyst_enabled => false,
31+
# :ccache_enabled => true
32+
)
33+
34+
require_relative '../node_modules/react-native-google-maps-plus/scripts/svgkit_patch'
35+
apply_svgkit_patch(installer)
6936
end
7037
```
7138

android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,14 @@ class GoogleMapsViewImpl(
345345
var userInterfaceStyle: Int? = null
346346
set(value) {
347347
field = value
348-
onUi { googleMap?.mapColorScheme = value ?: MapColorScheme.FOLLOW_SYSTEM }
348+
onUi {
349+
try {
350+
// / not supported when liteMode enabled on latest renderer
351+
googleMap?.mapColorScheme = value ?: MapColorScheme.FOLLOW_SYSTEM
352+
} catch (_: UnsupportedOperationException) {
353+
// / ignore
354+
}
355+
}
349356
}
350357

351358
var mapZoomConfig: RNMapZoomConfig? = null

example/ios/GoogleMapsPlusExample.xcodeproj/project.pbxproj

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212
1C2CD62E2E2A54A300F92915 /* Release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 1C2CD62C2E2A54A300F92915 /* Release.xcconfig */; };
1313
1CFDC6AB2E6CA193005652FB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1CFDC6A32E6CA144005652FB /* InfoPlist.strings */; };
1414
1CFDC6AC2E6CA193005652FB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1CFDC6A62E6CA144005652FB /* InfoPlist.strings */; };
15+
2B37C898F2A1AAA9486D9912 /* Pods_GoogleMapsPlusExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EA1D48E107416ADB6C60F35 /* Pods_GoogleMapsPlusExample.framework */; };
1516
50142BCB3C4DD87E00709364 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
1617
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
1718
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
18-
89A7882DE3880107EB2CBBE5 /* Pods_GoogleMapsPlusExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F220CF45106F6693F3EE2E0 /* Pods_GoogleMapsPlusExample.framework */; };
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
22-
0F220CF45106F6693F3EE2E0 /* Pods_GoogleMapsPlusExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GoogleMapsPlusExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2322
13B07F961A680F5B00A75B9A /* GoogleMapsPlusExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GoogleMapsPlusExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
2423
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GoogleMapsPlusExample/Images.xcassets; sourceTree = "<group>"; };
2524
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GoogleMapsPlusExample/Info.plist; sourceTree = "<group>"; };
2625
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = GoogleMapsPlusExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
26+
15FC9D1ABAC4D1322D65610A /* Pods-GoogleMapsPlusExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsPlusExample.debug.xcconfig"; path = "Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample.debug.xcconfig"; sourceTree = "<group>"; };
2727
1C2CD62B2E2A54A300F92915 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = GoogleMapsPlusExample/Debug.xcconfig; sourceTree = "<group>"; };
2828
1C2CD62C2E2A54A300F92915 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = GoogleMapsPlusExample/Release.xcconfig; sourceTree = "<group>"; };
2929
1CFDC6A32E6CA144005652FB /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; };
3030
1CFDC6A62E6CA144005652FB /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = "<group>"; };
31+
5EA1D48E107416ADB6C60F35 /* Pods_GoogleMapsPlusExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GoogleMapsPlusExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3132
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = GoogleMapsPlusExample/AppDelegate.swift; sourceTree = "<group>"; };
32-
784D90989C3F0C69A83034D7 /* Pods-GoogleMapsPlusExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsPlusExample.debug.xcconfig"; path = "Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample.debug.xcconfig"; sourceTree = "<group>"; };
3333
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = GoogleMapsPlusExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
34-
CE69916FEF4DE92FC3CC2A4C /* Pods-GoogleMapsPlusExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsPlusExample.release.xcconfig"; path = "Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample.release.xcconfig"; sourceTree = "<group>"; };
34+
9B44C46EC9F8E58D8B6DDD10 /* Pods-GoogleMapsPlusExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsPlusExample.release.xcconfig"; path = "Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample.release.xcconfig"; sourceTree = "<group>"; };
3535
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3636
/* End PBXFileReference section */
3737

@@ -40,7 +40,7 @@
4040
isa = PBXFrameworksBuildPhase;
4141
buildActionMask = 2147483647;
4242
files = (
43-
89A7882DE3880107EB2CBBE5 /* Pods_GoogleMapsPlusExample.framework in Frameworks */,
43+
2B37C898F2A1AAA9486D9912 /* Pods_GoogleMapsPlusExample.framework in Frameworks */,
4444
);
4545
runOnlyForDeploymentPostprocessing = 0;
4646
};
@@ -85,7 +85,7 @@
8585
isa = PBXGroup;
8686
children = (
8787
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
88-
0F220CF45106F6693F3EE2E0 /* Pods_GoogleMapsPlusExample.framework */,
88+
5EA1D48E107416ADB6C60F35 /* Pods_GoogleMapsPlusExample.framework */,
8989
);
9090
name = Frameworks;
9191
sourceTree = "<group>";
@@ -122,8 +122,8 @@
122122
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
123123
isa = PBXGroup;
124124
children = (
125-
784D90989C3F0C69A83034D7 /* Pods-GoogleMapsPlusExample.debug.xcconfig */,
126-
CE69916FEF4DE92FC3CC2A4C /* Pods-GoogleMapsPlusExample.release.xcconfig */,
125+
15FC9D1ABAC4D1322D65610A /* Pods-GoogleMapsPlusExample.debug.xcconfig */,
126+
9B44C46EC9F8E58D8B6DDD10 /* Pods-GoogleMapsPlusExample.release.xcconfig */,
127127
);
128128
path = Pods;
129129
sourceTree = "<group>";
@@ -135,13 +135,13 @@
135135
isa = PBXNativeTarget;
136136
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "GoogleMapsPlusExample" */;
137137
buildPhases = (
138-
4E15D3C08A668E0F5197AB1A /* [CP] Check Pods Manifest.lock */,
138+
A824DF843ACA8BC144DEDA05 /* [CP] Check Pods Manifest.lock */,
139139
13B07F871A680F5B00A75B9A /* Sources */,
140140
13B07F8C1A680F5B00A75B9A /* Frameworks */,
141141
13B07F8E1A680F5B00A75B9A /* Resources */,
142142
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
143-
A4CAAB1E58D131C3CE20A532 /* [CP] Embed Pods Frameworks */,
144-
5AC776E708BE569B105221C3 /* [CP] Copy Pods Resources */,
143+
357474998C3CCFA5FBC8D97B /* [CP] Embed Pods Frameworks */,
144+
DBF885C9135E7CF4993E741D /* [CP] Copy Pods Resources */,
145145
);
146146
buildRules = (
147147
);
@@ -218,7 +218,24 @@
218218
shellPath = /bin/sh;
219219
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
220220
};
221-
4E15D3C08A668E0F5197AB1A /* [CP] Check Pods Manifest.lock */ = {
221+
357474998C3CCFA5FBC8D97B /* [CP] Embed Pods Frameworks */ = {
222+
isa = PBXShellScriptBuildPhase;
223+
buildActionMask = 2147483647;
224+
files = (
225+
);
226+
inputFileListPaths = (
227+
"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
228+
);
229+
name = "[CP] Embed Pods Frameworks";
230+
outputFileListPaths = (
231+
"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
232+
);
233+
runOnlyForDeploymentPostprocessing = 0;
234+
shellPath = /bin/sh;
235+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks.sh\"\n";
236+
showEnvVarsInLog = 0;
237+
};
238+
A824DF843ACA8BC144DEDA05 /* [CP] Check Pods Manifest.lock */ = {
222239
isa = PBXShellScriptBuildPhase;
223240
buildActionMask = 2147483647;
224241
files = (
@@ -240,7 +257,7 @@
240257
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
241258
showEnvVarsInLog = 0;
242259
};
243-
5AC776E708BE569B105221C3 /* [CP] Copy Pods Resources */ = {
260+
DBF885C9135E7CF4993E741D /* [CP] Copy Pods Resources */ = {
244261
isa = PBXShellScriptBuildPhase;
245262
buildActionMask = 2147483647;
246263
files = (
@@ -257,23 +274,6 @@
257274
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-resources.sh\"\n";
258275
showEnvVarsInLog = 0;
259276
};
260-
A4CAAB1E58D131C3CE20A532 /* [CP] Embed Pods Frameworks */ = {
261-
isa = PBXShellScriptBuildPhase;
262-
buildActionMask = 2147483647;
263-
files = (
264-
);
265-
inputFileListPaths = (
266-
"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
267-
);
268-
name = "[CP] Embed Pods Frameworks";
269-
outputFileListPaths = (
270-
"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
271-
);
272-
runOnlyForDeploymentPostprocessing = 0;
273-
shellPath = /bin/sh;
274-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GoogleMapsPlusExample/Pods-GoogleMapsPlusExample-frameworks.sh\"\n";
275-
showEnvVarsInLog = 0;
276-
};
277277
/* End PBXShellScriptBuildPhase section */
278278

279279
/* Begin PBXSourcesBuildPhase section */

example/ios/GoogleMapsPlusExample/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<true/>
3737
</dict>
3838
<key>NSLocationWhenInUseUsageDescription</key>
39-
<string></string>
39+
<string>This app needs access to your location to show your current position on the map.</string>
4040
<key>RCTNewArchEnabled</key>
4141
<true/>
4242
<key>UILaunchStoryboardName</key>

example/ios/Podfile

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,8 @@ target 'GoogleMapsPlusExample' do
2828
:mac_catalyst_enabled => false,
2929
# :ccache_enabled => true
3030
)
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
3631

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
32+
require_relative '../../scripts/svgkit_patch'
33+
apply_svgkit_patch(installer)
6734
end
6835
end

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ PODS:
25042504
- ReactCommon/turbomodule/core
25052505
- SocketRocket
25062506
- Yoga
2507-
- RNGoogleMapsPlus (1.6.2):
2507+
- RNGoogleMapsPlus (1.8.6):
25082508
- boost
25092509
- DoubleConversion
25102510
- fast_float
@@ -3120,14 +3120,14 @@ SPEC CHECKSUMS:
31203120
ReactCodegen: 0bce2d209e2e802589f4c5ff76d21618200e74cb
31213121
ReactCommon: 801eff8cb9c940c04d3a89ce399c343ee3eff654
31223122
RNGestureHandler: 67501c6d447027581aa1d8e5a7a3ea5a7f0a89ff
3123-
RNGoogleMapsPlus: 2e51359c4ec90a88a315950cfd8d055c1615d7df
3123+
RNGoogleMapsPlus: d94844f2d397099f2153d5f9a29e96f70f547bde
31243124
RNReanimated: 8f0185df21f0dea34ee8c9611ba88c17a290ed9a
31253125
RNScreens: 98771ad898d1c0528fc8139606bbacf5a2e9d237
31263126
RNWorklets: ab618bf7d1c7fd2cb793b9f0f39c3e29274b3ebf
31273127
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
31283128
SVGKit: 1ad7513f8c74d9652f94ed64ddecda1a23864dea
31293129
Yoga: 526f25666395d30c297d53154398ffd249eaf9e1
31303130

3131-
PODFILE CHECKSUM: 18d25340bc263a2eab86e2d8e5cfd9ad55ef6458
3131+
PODFILE CHECKSUM: 53fea21acf44c419ecb277b368cb4c1e34124dfb
31323132

31333133
COCOAPODS: 1.15.2

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"start": "watchman watch-del-all && react-native start",
99
"ios:pods": "rm -f ios/Podfile.lock && rm -rf ios/Pods && cd ios && bundle install && bundle exec pod install --repo-update",
1010
"build:android": "react-native build-android",
11-
"build:ios": "react-native build-ios --mode Debug --extra-params 'CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=\"\" EXPANDED_CODE_SIGN_IDENTITY=\"\" DEVELOPMENT_TEAM=\"\" COCOAPODS_PARALLEL_CODE_SIGN=false'"
11+
"build:ios": "react-native build-ios --mode Debug --extra-params 'CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO'"
1212
},
1313
"dependencies": {
1414
"@react-navigation/native": "7.1.19",

expoConfig/src/ios/withIosGoogleMapsPlus.ts

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -39,53 +39,21 @@ const withIosGoogleMapsPlus: ConfigPlugin<RNGoogleMapsPlusExpoPluginProps> = (
3939
}).contents;
4040
}
4141

42-
const patchSnippet = `
43-
# Force iOS 16+ to avoid deployment target warnings
44-
installer.pods_project.targets.each do |target|
45-
target.build_configurations.each do |config|
46-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
47-
end
48-
end
49-
50-
# --- SVGKit Patch ---
51-
require 'fileutils'
52-
svgkit_path = File.join(installer.sandbox.pod_dir('SVGKit'), 'Source')
53-
54-
# --- Patch Node.h imports ---
55-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
56-
FileUtils.chmod("u+w", file)
57-
text = File.read(file)
58-
new_contents = text.gsub('#import "Node.h"', '#import "SVGKit/Node.h"')
59-
File.open(file, 'w') { |f| f.write(new_contents) }
60-
end
61-
62-
# --- Patch CSSValue.h imports ---
63-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
64-
FileUtils.chmod("u+w", file)
65-
text = File.read(file)
66-
new_contents = text.gsub('#import "CSSValue.h"', '#import "SVGKit/CSSValue.h"')
67-
File.open(file, 'w') { |f| f.write(new_contents) }
68-
end
69-
70-
# --- Patch SVGLength.h imports ---
71-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
72-
FileUtils.chmod("u+w", file)
73-
text = File.read(file)
74-
new_contents = text.gsub('#import "SVGLength.h"', '#import "SVGKit/SVGLength.h"')
75-
File.open(file, 'w') { |f| f.write(new_contents) }
76-
end
42+
const podFilePatch = `
43+
require_relative '../node_modules/react-native-google-maps-plus/scripts/svgkit_patch'
44+
apply_svgkit_patch(installer)
7745
`;
7846

7947
if (src.includes('post_install do |installer|')) {
8048
src = src.replace(
8149
/post_install do \|installer\|([\s\S]*?)end/,
8250
(match, inner) => {
8351
if (inner.includes('SVGKit Patch')) return match; // idempotent
84-
return `post_install do |installer|${inner}\n${patchSnippet}\nend`;
52+
return `post_install do |installer|${inner}\n${podFilePatch}\nend`;
8553
}
8654
);
8755
} else {
88-
src += `\npost_install do |installer|\n${patchSnippet}\nend\n`;
56+
src += `\npost_install do |installer|\n${podFilePatch}\nend\n`;
8957
}
9058

9159
conf.modResults.contents = src;

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"ios/**/*.swift",
6464
"app.plugin.js",
6565
"*.podspec",
66+
"scripts",
6667
"README.md"
6768
],
6869
"workspaces": [
@@ -88,6 +89,7 @@
8889
"@react-native/babel-preset": "0.82.1",
8990
"@react-native/eslint-config": "0.82.1",
9091
"@semantic-release/changelog": "6.0.3",
92+
"@semantic-release/exec": "7.1.0",
9193
"@semantic-release/git": "10.0.1",
9294
"@semantic-release/npm": "13.1.1",
9395
"@types/jest": "30.0.0",
@@ -101,12 +103,12 @@
101103
"eslint-plugin-prettier": "5.5.4",
102104
"jest": "30.2.0",
103105
"lefthook": "2.0.2",
104-
"nitrogen": "0.31.4",
106+
"nitrogen": "0.31.5",
105107
"prettier": "3.6.2",
106108
"react": "19.1.1",
107109
"react-native": "0.82.1",
108110
"react-native-builder-bob": "0.40.14",
109-
"react-native-nitro-modules": "0.31.4",
111+
"react-native-nitro-modules": "0.31.5",
110112
"semantic-release": "25.0.1",
111113
"typescript": "5.9.3"
112114
},

0 commit comments

Comments
 (0)