@livx.cc/appwrap 0.58.2 → 0.58.3
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.
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
|
|
15
15
|
defaultConfig {
|
|
16
16
|
minSdkVersion 26 // Android 8.0 — Health Connect's floor (~99% of devices); was 24
|
|
17
|
-
targetSdkVersion
|
|
17
|
+
targetSdkVersion 36 // Play requires target API 36 (Android 16) from 31 Aug 2026
|
|
18
18
|
|
|
19
19
|
// Version Information
|
|
20
20
|
versionCode 2
|
|
@@ -127,6 +127,22 @@ class DevCertNavDelegate extends NSObject implements WKNavigationDelegate {
|
|
|
127
127
|
// EXPLICITLY — ObjC message forwarding (forwardingTargetForSelector) is unreliable for a @NativeClass,
|
|
128
128
|
// and a decision method (below) whose `decisionHandler` is never called STALLS the navigation → blank.
|
|
129
129
|
webViewDecidePolicyForNavigationActionDecisionHandler(webView: WKWebView, navigationAction: any, decisionHandler: (p: number) => void): void {
|
|
130
|
+
// External URL schemes (mailto:/tel:/app deeplinks/…) can't be rendered by the WKWebView —
|
|
131
|
+
// navigating to one in-place silently fails ("unsupported URL"). Mirror the Android shell's
|
|
132
|
+
// shouldOverrideUrlLoading: hand every non-web scheme to the OS and cancel the navigation.
|
|
133
|
+
// http/https/file/about/blob/data (+ empty) stay in-WebView.
|
|
134
|
+
try {
|
|
135
|
+
const url: NSURL | null = navigationAction?.request?.URL ?? null;
|
|
136
|
+
const scheme = url?.scheme?.toLowerCase?.() ?? '';
|
|
137
|
+
// 'app' is the shell's own WKURLSchemeHandler serving the bundled PWA (loader:'app') — in-WebView.
|
|
138
|
+
if (scheme && !['http', 'https', 'file', 'about', 'blob', 'data', 'javascript', 'app'].includes(scheme)) {
|
|
139
|
+
UIApplication.sharedApplication.openURLOptionsCompletionHandler(url!, NSDictionary.new() as any, null);
|
|
140
|
+
decisionHandler(0 /* WKNavigationActionPolicy.Cancel */);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
} catch (e) {
|
|
144
|
+
console.warn('AppWrap: external-scheme nav check failed', e);
|
|
145
|
+
}
|
|
130
146
|
if (this.fbResponds('webView:decidePolicyForNavigationAction:decisionHandler:')) {
|
|
131
147
|
(this.fallback as any).webViewDecidePolicyForNavigationActionDecisionHandler(webView, navigationAction, decisionHandler);
|
|
132
148
|
} else {
|