You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
└── ios/Sources/Snapfill/ # @snapfill/ios — Swift package
144
+
├── Snapfill # Script injection + message bridge
145
+
├── SnapfillWebView # Pre-wired WKWebView
146
+
├── SnapfillDelegate # Delegate protocol
147
+
└── SnapfillModels # Data structs
133
148
```
134
149
135
-
Each module exports both:
136
-
-**Functions** for direct use in web context (tree-shakeable)
137
-
-**Script strings** (via `injectable.ts`) for WebView injection
138
-
139
-
Native libraries use the script strings, injecting them via platform-specific WebView APIs (`evaluateJavascript` on Android, `WKUserScript` on iOS). A bridge shim creates `window.ReactNativeWebView.postMessage()` so the same scripts work across all platforms.
150
+
Core exports both **functions** for direct web use (tree-shakeable) and **script strings** (via `injectable.ts`) for WebView injection. Native libraries inject the same scripts via platform-specific WebView APIs (`evaluateJavascript` on Android, `WKUserScript` on iOS). A bridge shim provides `window.ReactNativeWebView.postMessage()` so the same scripts work across all platforms.
0 commit comments