Skip to content

Commit 73c997c

Browse files
committed
chore(example): beautify example app UI
1 parent 2f2bb2c commit 73c997c

26 files changed

+1853
-775
lines changed

README.md

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

android/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ apply plugin: "kotlin-android"
2525
apply from: '../nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle'
2626
apply from: "./fix-prefab.gradle"
2727

28-
apply plugin: "com.facebook.react"
28+
if (rootProject.name != "rngooglemapsplus.example") {
29+
apply plugin: "com.facebook.react"
30+
} else {
31+
println("\u001B[33m⚠️ Skipping React Native Gradle plugin in library (example build detected)\u001B[0m")
32+
}
2933

3034
def getExtOrIntegerDefault(name) {
3135
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RNGoogleMapsPlus_" + name]).toInteger()

example/babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const root = path.resolve(__dirname, '..');
77
module.exports = getConfig(
88
{
99
presets: ['module:@react-native/babel-preset'],
10+
plugins: ['react-native-worklets/plugin'],
1011
},
1112
{ root, pkg }
1213
);

0 commit comments

Comments
 (0)