react-native-minimal-webview 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +35 -31
  2. package/android/src/main/java/expo/modules/minimalwebview/Hooks.kt +1 -6
  3. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebView.kt +56 -31
  4. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewClients.kt +3 -2
  5. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewModule.kt +16 -4
  6. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewNavigation.kt +3 -3
  7. package/android/src/main/java/expo/modules/minimalwebview/MinimalWebViewScripts.kt +5 -7
  8. package/android/src/main/java/expo/modules/minimalwebview/PlatformSettings.kt +47 -36
  9. package/android/src/main/java/expo/modules/minimalwebview/PullToRefresh.kt +2 -2
  10. package/android/src/main/java/expo/modules/minimalwebview/requests/Downloads.kt +7 -8
  11. package/android/src/main/java/expo/modules/minimalwebview/requests/FullscreenVideo.kt +2 -2
  12. package/android/src/main/java/expo/modules/minimalwebview/requests/Permissions.kt +4 -5
  13. package/build/WebView.d.ts +4 -10
  14. package/build/WebView.d.ts.map +1 -1
  15. package/build/WebView.js +60 -103
  16. package/build/WebView.js.map +1 -1
  17. package/build/bridge/createBridge.d.ts +17 -11
  18. package/build/bridge/createBridge.d.ts.map +1 -1
  19. package/build/bridge/createBridge.js +32 -44
  20. package/build/bridge/createBridge.js.map +1 -1
  21. package/build/bridge/endpoint.d.ts +1 -3
  22. package/build/bridge/endpoint.d.ts.map +1 -1
  23. package/build/bridge/endpoint.js +2 -2
  24. package/build/bridge/endpoint.js.map +1 -1
  25. package/build/bridge/origins.d.ts +5 -2
  26. package/build/bridge/origins.d.ts.map +1 -1
  27. package/build/bridge/origins.js +15 -4
  28. package/build/bridge/origins.js.map +1 -1
  29. package/build/bridge/pageClient.generated.d.ts +1 -1
  30. package/build/bridge/pageClient.generated.d.ts.map +1 -1
  31. package/build/bridge/pageClient.generated.js +1 -1
  32. package/build/bridge/pageClient.generated.js.map +1 -1
  33. package/build/index.d.ts +1 -1
  34. package/build/index.d.ts.map +1 -1
  35. package/build/index.js +1 -1
  36. package/build/index.js.map +1 -1
  37. package/build/{defaultNavigationRules.d.ts → navigationRules.d.ts} +10 -1
  38. package/build/navigationRules.d.ts.map +1 -0
  39. package/build/navigationRules.js +93 -0
  40. package/build/navigationRules.js.map +1 -0
  41. package/build/refStore.d.ts.map +1 -1
  42. package/build/refStore.js +13 -17
  43. package/build/refStore.js.map +1 -1
  44. package/build/types.d.ts +66 -40
  45. package/build/types.d.ts.map +1 -1
  46. package/ios/DelegateProxy.swift +35 -30
  47. package/ios/Loads.swift +4 -4
  48. package/ios/MRWInvoke.h +8 -0
  49. package/ios/MRWInvoke.m +39 -24
  50. package/ios/MinimalWebView+Dialogs.swift +4 -2
  51. package/ios/MinimalWebView+Navigation.swift +23 -13
  52. package/ios/MinimalWebView+Scripts.swift +6 -1
  53. package/ios/MinimalWebView.swift +78 -29
  54. package/ios/MinimalWebViewModule.swift +1 -0
  55. package/ios/NavigationRules.swift +15 -15
  56. package/ios/PlatformSettings.swift +2 -13
  57. package/ios/SharedCookies.swift +1 -2
  58. package/mocks/MinimalWebView.ts +5 -0
  59. package/package.json +9 -8
  60. package/src/WebView.tsx +74 -117
  61. package/src/bridge/createBridge.ts +45 -53
  62. package/src/bridge/endpoint.ts +3 -5
  63. package/src/bridge/origins.ts +18 -6
  64. package/src/bridge/pageClient.generated.ts +1 -1
  65. package/src/index.ts +1 -1
  66. package/src/navigationRules.ts +111 -0
  67. package/src/refStore.ts +15 -19
  68. package/src/types.ts +66 -40
  69. package/build/defaultNavigationRules.d.ts.map +0 -1
  70. package/build/defaultNavigationRules.js +0 -22
  71. package/build/defaultNavigationRules.js.map +0 -1
  72. package/ios/MRWExceptions.h +0 -9
  73. package/ios/MRWExceptions.m +0 -10
  74. package/src/defaultNavigationRules.ts +0 -24
package/build/types.d.ts CHANGED
@@ -5,6 +5,7 @@ import type { AndroidSettingKeys, CGPoint, CGRect, CGSize, IOSSettingKeys, UIEdg
5
5
  /**
6
6
  * What the WebView loads: a URL, or an HTML string.
7
7
  * @see [Local files example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#local-files)
8
+ * @see [Bundled page folder example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#load-a-bundled-page-folder)
8
9
  * @group WebView
9
10
  */
10
11
  export type WebViewSource = {
@@ -195,7 +196,8 @@ export type NavigationState = {
195
196
  * - `failed`: a network or SSL error, or a renderer crash, cut it off.
196
197
  * - `cancelled`: it never showed a page (a stop before the response, a download, a 204, a redirect the rules blocked,
197
198
  * a load a newer one replaced); a stop after the page arrived is `cancelled` on iOS but `finished` on Android, and
198
- * a 204 is `finished` on iOS 17.
199
+ * a 204 is `finished` below iOS 26.2. On iOS a load replaced before it commits doesn't end: `loading` stays true and
200
+ * the newer load's outcome ends both.
199
201
  *
200
202
  * On Android with an Android System WebView older than 146, a load that never commits changes nothing here.
201
203
  */
@@ -231,20 +233,21 @@ export type ProcessGoneEvent = {
231
233
  */
232
234
  cause: 'crash' | 'memory' | 'unknown';
233
235
  /**
234
- * Whether the core reloads the page after the crash.
236
+ * Whether the core reloads the page after the crash. The reload waits until the view is in a visible window and
237
+ * the app is not in the background; a `load()`, `reload()` or new `source` meanwhile loads instead.
235
238
  *
236
239
  * - iOS: in place.
237
- * - Android: in a new WebView, once the view's window is visible. The history is restored unless the `source` page
238
- * was on screen. The props are applied again, but not what `call` set.
240
+ * - Android: in a new WebView. The history is restored, unless the `source` page was on screen and reloads. The
241
+ * props are applied again, but not what `call` set.
239
242
  *
240
243
  * It is false when:
241
244
  *
242
245
  * - a POST `source` is on screen: as in a browser, it isn't sent again unasked;
243
246
  * - more than 3 crashes happened in 60 s (counted for the whole app on Android), until the next
244
- * {@link WebViewRef.reload | reload()} (on iOS also a `source` change).
247
+ * {@link WebViewRef.reload | reload()} or {@link WebViewRef.load | load()} (on iOS also a `source` change).
245
248
  *
246
- * While false the view is blank. Leave `reload()` to the user, as a retry button: called from `onProcessGone` it
247
- * sends the POST again, or starts the crash loop over.
249
+ * While false the view is blank. Leave `reload()` and `load()` to the user, as a retry button: called from
250
+ * `onProcessGone`, `reload()` sends the POST again, and either starts the crash loop over.
248
251
  * @see [Loading and error screens example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#loading-and-error-screens)
249
252
  */
250
253
  recovered: boolean;
@@ -359,7 +362,7 @@ type PayloadArg<Payload> = undefined extends Payload ? [payload?: Payload] : [pa
359
362
  * latest 1000 are kept: an older call rejects with `unavailable`.
360
363
  *
361
364
  * The page's own calls don't wait: one made before React Native has registered its method rejects with `not_found`.
362
- * Unmounting rejects the calls in flight with `navigated`.
365
+ * Unmounting rejects the calls the page got with `navigated`, and the queued ones with `unavailable`.
363
366
  *
364
367
  * The page's `window.nativeBridge` has the same four methods, from its side: {@link PageBridge}.
365
368
  * @see [Bridge example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#the-bridge)
@@ -658,7 +661,8 @@ export type AndroidSettings = {
658
661
  *
659
662
  * - On: `javaScriptEnabled`, `domStorageEnabled`, `supportMultipleWindows`, `builtInZoomControls`,
660
663
  * `useWideViewPort`, `loadWithOverviewMode` and, with Android System WebView 146 and newer,
661
- * `backForwardCacheEnabled`.
664
+ * `backForwardCacheEnabled`. Older ones refuse `backForwardCacheEnabled: true`, in this prop and in `call`:
665
+ * a page restored from the cache there reports no load end.
662
666
  * - Off: `allowFileAccess`, `allowContentAccess`, `displayZoomControls` and `downloadFaviconsEnabled`.
663
667
  * - `mixedContentMode`: `MIXED_CONTENT_NEVER_ALLOW`.
664
668
  *
@@ -769,15 +773,14 @@ export type CodedError = Error & {
769
773
  code: ErrorCode;
770
774
  };
771
775
  /**
772
- * What the WebView loads, its settings, and the callbacks for its events and the page's requests.
776
+ * The props of `<WebView>`, of which only `source` is required.
773
777
  *
774
- * The ones from React Native's `ViewProps` (`style`, `testID`, `nativeID`, the accessibility props, layout and touch
775
- * events) go to the native view.
778
+ * React Native's `ViewProps` (`style`, `testID`, `nativeID`, the accessibility props, layout and touch events) go to
779
+ * the native view.
776
780
  *
777
781
  * Every `on…` callback is read when its event or request comes, so adding, changing or removing one applies to the
778
- * next, and a request without one gets the default described on its prop.
779
- *
780
- * One that answers a request and throws (or rejects) is logged with `console.error` and gives the refusing answer:
782
+ * next. A request without its callback gets the default its prop describes; one whose callback throws or rejects is
783
+ * logged with `console.error` and gets the refusing answer:
781
784
  *
782
785
  * - `onNavigationRequest`: `block`
783
786
  * - `onOpenExternal`: null (the core opens nothing)
@@ -788,16 +791,15 @@ export type CodedError = Error & {
788
791
  * The `signal` such a callback gets aborts when the core stops waiting for its answer (the page moved on, crashed or
789
792
  * unmounted), and a late answer is dropped.
790
793
  *
791
- * JS dialogs (`alert`, `confirm`, `prompt`) and HTTP auth have no prop.
794
+ * JS dialogs (`alert`, `confirm`, `prompt`) and HTTP auth have no prop: `dialogs` and `basicAuthCredential` of
795
+ * `@react-native-minimal-webview/extensions` take them over, or a native hook does. Without one:
792
796
  *
793
797
  * - iOS dialogs: a `UIAlertController` titled with the frame's host, or `JavaScript` for a frame without one
794
798
  * (`data:`, sandboxed, `file:`). One shows at a time; one that comes while another shows is cancelled.
795
- * - Android dialogs: WebView's own.
799
+ * - Android dialogs: WebView's own. One still on screen when its WebView unmounts stays there, and a WebView older
800
+ * than 149 then gets no touches until the app restarts. The `dialogs` extension shows no native dialog.
796
801
  * - HTTP auth: cancelled on Android. On iOS WebKit's default handling applies, so without a stored credential the
797
802
  * site's 401 page shows.
798
- *
799
- * `dialogs` and `basicAuthCredential` of `@react-native-minimal-webview/extensions` take them over, or a native hook
800
- * does.
801
803
  * @sortStrategy source-order
802
804
  * @group WebView
803
805
  */
@@ -822,7 +824,9 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
822
824
  * it, those keys apply; unset, they are the platform's own user agent.
823
825
  *
824
826
  * To append to the default one instead, set `ios.configuration.applicationNameForUserAgent` and, on Android,
825
- * `android.settings.userAgentString` to `AndroidWebView.defaultUserAgent` plus your suffix.
827
+ * `android.settings.userAgentString` to `AndroidWebView.defaultUserAgent` plus your suffix. A change to
828
+ * {@link IOSSettings.configuration | ios.configuration} recreates the WebView: for a suffix that changes, read
829
+ * `navigator.userAgent` once with {@link WebViewRef.evaluate | evaluate()} and set `userAgent` to it plus the suffix.
826
830
  *
827
831
  * A change applies from the next navigation.
828
832
  */
@@ -845,8 +849,8 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
845
849
  *
846
850
  * These skip the rules:
847
851
  *
848
- * - the `source` load, reloads and back/forward; a redirect of the `source` load goes to the rules, and on Android so
849
- * does a redirect of a reload or back/forward;
852
+ * - the `source` load, {@link WebViewRef.load | load}, reloads and back/forward; a redirect of the `source` load or
853
+ * a `load` goes to the rules, and on Android so does a redirect of a reload or back/forward;
850
854
  * - a form POST, on either platform, an iframe's to the main frame (`target=_top`) included: it loads in place; one
851
855
  * to a new window loads in place on iOS and isn't shown on Android (the request may still reach the server);
852
856
  * - `about:`, `data:` and `javascript:`, which load in place, except as a new window
@@ -925,11 +929,13 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
925
929
  /**
926
930
  * Syncs cookies between `HTTPCookieStorage`, which holds the cookies of native requests, and the WebView:
927
931
  *
928
- * - `HTTPCookieStorage` into the WebView before each `source` load, which waits for it;
932
+ * - `HTTPCookieStorage` into the WebView before each `source` load and {@link WebViewRef.load | load}, which wait
933
+ * for it;
929
934
  * - the WebView into `HTTPCookieStorage` on every cookie change, deletions included, as it happens.
930
935
  *
931
- * Android needs nothing: `CookieManager` is shared app-wide, and flushed when the app goes to the background. A
932
- * WebView on another `android.webView.profile` has that profile's cookies instead.
936
+ * Android needs nothing: `CookieManager` is shared app-wide, React Native's `fetch` uses it too, and it is flushed
937
+ * when the app goes to the background. A WebView on another `android.webView.profile` has that profile's cookies
938
+ * instead.
933
939
  * @default `false`
934
940
  * @ios
935
941
  * @see [Cookies example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#cookies)
@@ -1000,7 +1006,8 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
1000
1006
  /**
1001
1007
  * Every navigation the rules, or their defaults, decided.
1002
1008
  *
1003
- * Not reported: the `source` load, reloads, back/forward, a form POST, and a navigation a native hook decides.
1009
+ * Not reported: the `source` load, {@link WebViewRef.load | load}, reloads, back/forward, a form POST, and a
1010
+ * navigation a native hook decides.
1004
1011
  * @see [Navigation rules example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#navigation-rules)
1005
1012
  */
1006
1013
  onNavigation?: (event: NavigationEvent) => void;
@@ -1018,6 +1025,9 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
1018
1025
  * with an Android System WebView older than 146, an SSL error on a back/forward load isn't reported.
1019
1026
  *
1020
1027
  * A renderer crash isn't reported here: it makes the cut-off load's `outcome` `failed` and calls `onProcessGone`.
1028
+ *
1029
+ * On Android it also gets a `network` error with code `-1` when no WebView can be made, because Android System
1030
+ * WebView is missing, disabled or updating; {@link WebViewRef.reload | reload()} tries again.
1021
1031
  * @see [Loading and error screens example](https://rasmuskard.github.io/react-native-minimal-webview/guides/examples/#loading-and-error-screens)
1022
1032
  */
1023
1033
  onError?: (event: LoadErrorEvent) => void;
@@ -1046,9 +1056,10 @@ export interface WebViewProps extends Omit<ViewProps, 'children'> {
1046
1056
  * return a promise:
1047
1057
  *
1048
1058
  * - After an unmount: the navigation methods do nothing and the four promise methods reject with `unavailable`.
1049
- * - Pending when the WebView unmounts: the four reject with `navigated`.
1050
- * - Just mounted: the four wait up to about a second for the view (on Android, a call from the parent's first effect
1051
- * can come before the view exists), then reject with `unavailable`. In the background they don't wait.
1059
+ * - Pending when the WebView unmounts: the four reject with `navigated`, and a waiting `load` does nothing.
1060
+ * - Just mounted: the four and `load` wait up to about a second for the view (on Android, a call from the parent's
1061
+ * first effect can come before the view exists), then the four reject with `unavailable` and `load` does nothing. In
1062
+ * the background they don't wait.
1052
1063
  * @sortStrategy source-order
1053
1064
  * @group WebView
1054
1065
  */
@@ -1062,6 +1073,22 @@ export type WebViewRef = {
1062
1073
  goBack(): void;
1063
1074
  /** Goes forward one page; does nothing unless `canGoForward`. */
1064
1075
  goForward(): void;
1076
+ /**
1077
+ * Loads `url` in place, as a navigation the app started, in a new history entry; the page on screen loads again in
1078
+ * its own. It leaves `source` as it is: a re-render with the same `source` still loads nothing. Together with a
1079
+ * `source` change, which of the two ends on screen depends on the platform and on timing: do one or the other.
1080
+ *
1081
+ * It starts the {@link ProcessGoneEvent.recovered | crash recovery} limit over. A `javascript:` URL loads nothing
1082
+ * (in development, with a warning): run a script with {@link WebViewRef.evaluate | evaluate}. Any other URL goes to
1083
+ * the platform, and one it can't load, such as an unknown scheme, ends with `outcome` `failed`; on iOS a string that
1084
+ * isn't a URL loads nothing, with a warning.
1085
+ *
1086
+ * A `file://` URL:
1087
+ *
1088
+ * - iOS: reads only within its directory.
1089
+ * - Android: needs `android.settings.allowFileAccess`, which lets a `file:` page read any file the app can.
1090
+ */
1091
+ load(url: string): void;
1065
1092
  /**
1066
1093
  * Reloads the page; after a failed load, retries it (the `source` again, with its headers, when that failed), and
1067
1094
  * loads the `source` when nothing is loaded.
@@ -1098,13 +1125,14 @@ export type WebViewRef = {
1098
1125
  */
1099
1126
  get(key: string): Promise<unknown>;
1100
1127
  /**
1101
- * Calls a platform method, `root.method`, and resolves with its result through JSON. It acts on the WebView as it is
1102
- * when the call arrives: a navigation doesn't reject it.
1128
+ * Calls a platform method, `root.method`, with `args`, and resolves with its result through JSON.
1103
1129
  *
1104
- * The roots are those of {@link WebViewRef.get | get}. On Android `method` is a public method of the root's object;
1105
- * on iOS an Objective-C selector.
1130
+ * The roots are those of {@link WebViewRef.get | get}. On iOS `method` is an Objective-C selector; on Android a
1131
+ * public method of the root's object. Leave a trailing completion handler (iOS) or `ValueCallback` (Android) out of
1132
+ * `args`: the call resolves with what it reports, or on iOS rejects with its error.
1106
1133
  *
1107
- * Rejects with a {@link CodedError}: `not_found`, `unavailable` or `native_error`.
1134
+ * It acts on the WebView as it is when the call arrives: a navigation doesn't reject it. Rejects with a
1135
+ * {@link CodedError}: `not_found`, `unavailable` or `native_error`.
1108
1136
  *
1109
1137
  * The core owns, and so rejects:
1110
1138
  *
@@ -1116,11 +1144,9 @@ export type WebViewRef = {
1116
1144
  * `resumeTimers`, `evaluateJavascript` and remote debugging
1117
1145
  * ({@link AndroidWebView.setWebContentsDebuggingEnabled}).
1118
1146
  *
1119
- * A trailing completion handler (iOS) or `ValueCallback` (Android) is left out of `args`: the call resolves with what
1120
- * it reports, or on iOS rejects with its error. On iOS, a selector whose completion handler isn't in this package's
1121
- * SDK headers, or reports something other than an object, an error or an integer, rejects with `native_error`. On
1122
- * Android, a method that takes `args` as they are wins over one that also takes a callback, and a `null` in the
1123
- * callback's place passes none.
1147
+ * On iOS, a selector whose completion handler isn't in this package's SDK headers, or reports something other than
1148
+ * an object, an error or an integer, rejects with `native_error`. On Android, a method that takes `args` as they are
1149
+ * wins over one that also takes a callback, and a `null` in the callback's place passes none.
1124
1150
  *
1125
1151
  * One mistake the signature can't catch crashes the app: on iOS an object argument of the wrong class, and on Android
1126
1152
  * a `null` listener or callback other than the trailing `ValueCallback`, once WebView calls it. For a method that
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EACV,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,MAAM,EACN,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,M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AAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzD;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACxE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,kEAAkE;IAClE,QAAQ,IAAI,eAAe,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC7C,CAAC"}
@@ -8,6 +8,8 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
8
8
  private weak var core: NSObject?
9
9
  var navigationDelegates: [WKNavigationDelegate] = []
10
10
  var uiDelegates: [WKUIDelegate] = []
11
+ /// Hears each action policy check a hook delegate takes: the core's own bookkeeping still needs it.
12
+ var hookDecides: (WKNavigationAction) -> Void = { _ in }
11
13
 
12
14
  init(core: NSObject) {
13
15
  self.core = core
@@ -37,7 +39,7 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
37
39
 
38
40
  override func forwardingTarget(for aSelector: Selector!) -> Any? {
39
41
  let hook = delegates(for: aSelector).first { $0.responds(to: aSelector) }
40
- if Self.decisions.contains(aSelector), let hook { return hook }
42
+ if Self.decisions.contains(where: { $0.selector == aSelector }), let hook { return hook }
41
43
  if let core, core.responds(to: aSelector) { return core }
42
44
  return hook ?? super.forwardingTarget(for: aSelector)
43
45
  }
@@ -88,6 +90,7 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
88
90
  decisionHandler: @escaping @MainActor (WKNavigationActionPolicy, WKWebpagePreferences) -> Void
89
91
  ) {
90
92
  let owner = takers(of: Self.actionPolicy).first
93
+ if owner != nil { hookDecides(navigationAction) }
91
94
  if let owner, owner.responds(to: Self.actionPolicyWithPreferences) {
92
95
  (owner as? WKNavigationDelegate)?.webView?(
93
96
  webView, decidePolicyFor: navigationAction, preferences: preferences, decisionHandler: decisionHandler)
@@ -108,39 +111,41 @@ final class DelegateProxy: NSObject, WKNavigationDelegate, WKUIDelegate {
108
111
  }
109
112
  }
110
113
 
111
- /// The decision callbacks more than one hook delegate implements, by selector name: only the first one gets each.
112
- var sharedDecisions: [String] {
113
- ([Self.actionPolicy] + Self.decisions).filter { takers(of: $0).count > 1 }.map(NSStringFromSelector)
114
- }
115
-
116
- /// The decisions a hook delegate takes that the core makes from the app's props or their defaults: each one's
117
- /// selector name and what stops applying.
118
- var takenDecisions: [(name: String, lost: String)] {
119
- Self.fromProps.filter { !takers(of: $0.0).isEmpty }.map { (NSStringFromSelector($0.0), $0.1) }
114
+ /// The warnings about the decisions the hook delegates take that this proxy hasn't given yet: one for a decision
115
+ /// more than one of them implements, as only the first one gets it, and one for a decision the core makes from the
116
+ /// app's props or their defaults, naming what stops applying.
117
+ func newWarnings() -> [String] {
118
+ Self.decisions.flatMap { decision, lost in
119
+ let name = NSStringFromSelector(decision)
120
+ let takers = takers(of: decision).count
121
+ return [
122
+ takers > 1 ? "\(name): more than one hook delegate implements it; only the first one gets it" : nil,
123
+ takers > 0 ? lost.map { "\(name): a hook delegate takes it, so \($0)" } : nil
124
+ ].compactMap { $0 }.filter { warned.insert($0).inserted }
125
+ }
120
126
  }
121
127
 
122
- private static let navigationResponse = NSSelectorFromString("webView:decidePolicyForNavigationResponse:decisionHandler:")
123
- private static let newWindow =
124
- NSSelectorFromString("webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:")
125
- private static let mediaCapture =
126
- NSSelectorFromString("webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:")
128
+ private var warned: Set<String> = []
127
129
 
128
- private static let fromProps: [(Selector, String)] = [
130
+ /// The decision callbacks: a hook delegate that implements one owns it, and `lost` is what stops applying when the
131
+ /// core makes it from the props. WebKit never asks for the plain action policy, as the proxy answers the other variant.
132
+ private static let decisions: [(selector: Selector, lost: String?)] = [
129
133
  (actionPolicy, "navigationRules, their defaults and onNavigationRequest don't apply to navigations"),
130
- (navigationResponse, "onDownload, opening downloads externally and onError's http errors don't apply"),
131
- (newWindow, "navigationRules, their defaults and onNavigationRequest don't apply to new windows"),
132
- (mediaCapture, "onPermissionRequest and the core's subframe deny don't apply")
133
- ]
134
-
135
- /// The decision callbacks the core implements: a hook delegate that implements one owns it. The action policy is
136
- /// not here: the proxy decides it above.
137
- private static let decisions = [
138
- navigationResponse,
139
- newWindow,
140
- NSSelectorFromString("webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:"),
141
- NSSelectorFromString("webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:"),
142
- NSSelectorFromString("webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:"),
143
- mediaCapture
134
+ (
135
+ NSSelectorFromString("webView:decidePolicyForNavigationResponse:decisionHandler:"),
136
+ "onDownload, opening downloads externally and onError's http errors don't apply"
137
+ ),
138
+ (
139
+ NSSelectorFromString("webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:"),
140
+ "navigationRules, their defaults and onNavigationRequest don't apply to new windows"
141
+ ),
142
+ (NSSelectorFromString("webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:"), nil),
143
+ (NSSelectorFromString("webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:"), nil),
144
+ (NSSelectorFromString("webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:"), nil),
145
+ (
146
+ NSSelectorFromString("webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:"),
147
+ "onPermissionRequest and the core's subframe deny don't apply"
148
+ )
144
149
  ]
145
150
  }
146
151
 
package/ios/Loads.swift CHANGED
@@ -3,14 +3,14 @@ import Foundation
3
3
  /// The main-frame loads' choices that need no WebView.
4
4
  enum Loads {
5
5
  /// Whether `a` and `b` are the same URL as WebKit reports one: with the scheme and host lowercase, the scheme's
6
- /// default port dropped and an empty path `/`. The rest (userinfo, path, query, fragment) compares exactly. It picks
7
- /// out our own loads (`programmaticUrl`), which skip the navigation rules: WebKit reports the load of a `source.uri`
6
+ /// default port dropped, dot segments removed and an empty path `/`. The rest (userinfo, path, query, fragment) compares exactly. It picks
7
+ /// out our own loads (`ownLoads`), which skip the navigation rules: WebKit reports the load of a `source.uri`
8
8
  /// of `https://Example.com:443` as `https://example.com/`.
9
9
  static func sameURL(_ a: URL, _ b: URL) -> Bool {
10
- canonical(a) == canonical(b)
10
+ canonical(a.standardized) == canonical(b.standardized)
11
11
  }
12
12
 
13
- /// `url` in the form `sameURL` compares.
13
+ /// `url` in the form `sameURL` compares, dot segments aside (Recovery compares them as Android does).
14
14
  static func canonical(_ url: URL) -> String {
15
15
  guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else { return url.absoluteString }
16
16
  components.scheme = components.scheme?.lowercased()
package/ios/MRWInvoke.h CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  NS_ASSUME_NONNULL_BEGIN
4
4
 
5
+ /// Runs `block` and returns the Objective-C exception it raised as `name: reason`, or nil. Swift can't catch those;
6
+ /// Key-Value Coding raises one for an unknown key or a value a setter rejects.
7
+ FOUNDATION_EXPORT NSString *_Nullable MRWCatchException(void (NS_NOESCAPE ^block)(void)) NS_REFINED_FOR_SWIFT;
8
+
5
9
  /// Calls `selector` on `target` with the JSON `args` and resolves with the result as `MRWJsonable` makes it, or with
6
10
  /// why it couldn't.
7
11
  ///
@@ -28,4 +32,8 @@ FOUNDATION_EXPORT void MRWInvoke(id target, SEL selector, NSArray *args, NSStrin
28
32
  /// `value` as JSON, in the forms WebViewRef.call's @returns lists; anything else, and nil, is null.
29
33
  FOUNDATION_EXPORT id MRWJsonable(id _Nullable value) NS_REFINED_FOR_SWIFT;
30
34
 
35
+ /// `json` as the struct the type encoding `type` names, in the forms WebViewRef.call's @param lists; nil for another
36
+ /// type or a value that doesn't fit.
37
+ FOUNDATION_EXPORT NSValue *_Nullable MRWStructValue(const char *type, id json) NS_REFINED_FOR_SWIFT;
38
+
31
39
  NS_ASSUME_NONNULL_END
package/ios/MRWInvoke.m CHANGED
@@ -1,22 +1,35 @@
1
1
  #import "MRWInvoke.h"
2
- #import "MRWExceptions.h"
3
2
  #import <UIKit/UIKit.h>
4
3
 
5
- static NSDictionary *MRWStruct(NSValue *value) {
6
- const char *type = value.objCType;
7
- if (strcmp(type, @encode(UIEdgeInsets)) == 0) {
8
- UIEdgeInsets i = value.UIEdgeInsetsValue;
9
- return @{@"top": @(i.top), @"left": @(i.left), @"bottom": @(i.bottom), @"right": @(i.right)};
10
- }
11
- if (strcmp(type, @encode(CGPoint)) == 0) return @{@"x": @(value.CGPointValue.x), @"y": @(value.CGPointValue.y)};
12
- if (strcmp(type, @encode(CGSize)) == 0) return @{@"width": @(value.CGSizeValue.width), @"height": @(value.CGSizeValue.height)};
13
- if (strcmp(type, @encode(CGRect)) == 0) {
14
- CGRect r = value.CGRectValue;
15
- return @{@"x": @(r.origin.x), @"y": @(r.origin.y), @"width": @(r.size.width), @"height": @(r.size.height)};
4
+ NSString *MRWCatchException(void (NS_NOESCAPE ^block)(void)) {
5
+ @try {
6
+ block();
7
+ return nil;
8
+ } @catch (NSException *exception) {
9
+ return [NSString stringWithFormat:@"%@: %@", exception.name, exception.reason ?: @""];
16
10
  }
11
+ }
12
+
13
+ /// The JSON keys of a struct `call` and the settings carry, in field order, by its type encoding; nil for any other.
14
+ /// Each one's fields are doubles (CGFloat), so its bytes are the values in that order.
15
+ static NSArray<NSString *> *MRWStructKeys(const char *type) {
16
+ if (strcmp(type, @encode(UIEdgeInsets)) == 0) return @[@"top", @"left", @"bottom", @"right"];
17
+ if (strcmp(type, @encode(CGPoint)) == 0) return @[@"x", @"y"];
18
+ if (strcmp(type, @encode(CGSize)) == 0) return @[@"width", @"height"];
19
+ if (strcmp(type, @encode(CGRect)) == 0) return @[@"x", @"y", @"width", @"height"];
17
20
  return nil;
18
21
  }
19
22
 
23
+ static NSDictionary *MRWStruct(NSValue *value) {
24
+ NSArray<NSString *> *keys = MRWStructKeys(value.objCType);
25
+ if (!keys) return nil;
26
+ double n[4];
27
+ [value getValue:n size:keys.count * sizeof(double)];
28
+ NSMutableDictionary *json = [NSMutableDictionary new];
29
+ for (NSUInteger i = 0; i < keys.count; i++) json[keys[i]] = @(n[i]);
30
+ return json;
31
+ }
32
+
20
33
  id MRWJsonable(id value) {
21
34
  if ([value isKindOfClass:NSNumber.class] || [value isKindOfClass:NSString.class]) return value;
22
35
  if ([value isKindOfClass:NSURL.class]) return [value absoluteString];
@@ -56,9 +69,9 @@ static id MRWObject(id json) {
56
69
  return json;
57
70
  }
58
71
 
59
- /// Reads `keys` of `object` as numbers into `out`; NO when one is missing or not a number.
72
+ /// Reads `keys` of `object` as numbers into `out`; NO when `keys` is nil or one is missing or not a number.
60
73
  static BOOL MRWNumbers(id object, NSArray<NSString *> *keys, double *out) {
61
- if (![object isKindOfClass:NSDictionary.class]) return NO;
74
+ if (!keys || ![object isKindOfClass:NSDictionary.class]) return NO;
62
75
  for (NSUInteger i = 0; i < keys.count; i++) {
63
76
  id number = object[keys[i]];
64
77
  if (![number isKindOfClass:NSNumber.class]) return NO;
@@ -67,6 +80,11 @@ static BOOL MRWNumbers(id object, NSArray<NSString *> *keys, double *out) {
67
80
  return YES;
68
81
  }
69
82
 
83
+ NSValue *MRWStructValue(const char *type, id json) {
84
+ double n[4];
85
+ return MRWNumbers(json, MRWStructKeys(type), n) ? [NSValue valueWithBytes:n objCType:type] : nil;
86
+ }
87
+
70
88
  #define MRW_SET(ctype, expr) { ctype v = (expr); [invocation setArgument:&v atIndex:index]; return YES; }
71
89
 
72
90
  /// Sets argument `index` from the JSON `value` as the type encoding `type` wants it, or returns NO when it doesn't fit.
@@ -96,10 +114,7 @@ static BOOL MRWSetArgument(NSInvocation *invocation, NSUInteger index, const cha
96
114
  MRW_SET(id, object)
97
115
  }
98
116
  case '{':
99
- if (strcmp(type, @encode(UIEdgeInsets)) == 0 && MRWNumbers(value, @[@"top", @"left", @"bottom", @"right"], n)) MRW_SET(UIEdgeInsets, UIEdgeInsetsMake(n[0], n[1], n[2], n[3]))
100
- if (strcmp(type, @encode(CGPoint)) == 0 && MRWNumbers(value, @[@"x", @"y"], n)) MRW_SET(CGPoint, CGPointMake(n[0], n[1]))
101
- if (strcmp(type, @encode(CGSize)) == 0 && MRWNumbers(value, @[@"width", @"height"], n)) MRW_SET(CGSize, CGSizeMake(n[0], n[1]))
102
- if (strcmp(type, @encode(CGRect)) == 0 && MRWNumbers(value, @[@"x", @"y", @"width", @"height"], n)) MRW_SET(CGRect, CGRectMake(n[0], n[1], n[2], n[3]))
117
+ if (MRWNumbers(value, MRWStructKeys(type), n)) { [invocation setArgument:n atIndex:index]; return YES; }
103
118
  break;
104
119
  default: break;
105
120
  }
@@ -125,12 +140,12 @@ static id MRWReturnValue(NSInvocation *invocation) {
125
140
  case 'f': MRW_GET(float, @(v))
126
141
  case 'd': MRW_GET(double, @(v))
127
142
  case '@': { __unsafe_unretained id v = nil; [invocation getReturnValue:&v]; return v; }
128
- case '{':
129
- if (strcmp(type, @encode(UIEdgeInsets)) == 0) MRW_GET(UIEdgeInsets, [NSValue valueWithUIEdgeInsets:v])
130
- if (strcmp(type, @encode(CGPoint)) == 0) MRW_GET(CGPoint, [NSValue valueWithCGPoint:v])
131
- if (strcmp(type, @encode(CGSize)) == 0) MRW_GET(CGSize, [NSValue valueWithCGSize:v])
132
- if (strcmp(type, @encode(CGRect)) == 0) MRW_GET(CGRect, [NSValue valueWithCGRect:v])
133
- return NSNull.null;
143
+ case '{': {
144
+ if (!MRWStructKeys(type)) return NSNull.null;
145
+ double n[4];
146
+ [invocation getReturnValue:n];
147
+ return [NSValue valueWithBytes:n objCType:type];
148
+ }
134
149
  default: return NSNull.null;
135
150
  }
136
151
  }
@@ -77,8 +77,10 @@ extension MinimalWebView: WKUIDelegate {
77
77
  }
78
78
 
79
79
  private func action(_ title: String, _ style: UIAlertAction.Style, _ complete: @escaping () -> Void) -> UIAlertAction {
80
- UIAlertAction(title: title, style: style) { [weak self] _ in
81
- self?.dialog = nil
80
+ UIAlertAction(title: title, style: style) { [weak self] action in
81
+ // UIKit runs this after the dismissal animation: an unmount or a crash meanwhile has completed the dialog.
82
+ guard let self, dialog?.controller.actions.contains(action) == true else { return }
83
+ dialog = nil
82
84
  complete()
83
85
  }
84
86
  }