@capgo/capacitor-inappbrowser 8.21.1 → 8.21.2
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/README.md
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
# @capgo/capacitor-inappbrowser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Open web content inside your Capacitor app with a full-featured in-app browser: custom toolbars, two-way messaging, JavaScript injection, navigation events and native layering behind your UI.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_inappbrowser"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-inappbrowser" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
4
6
|
|
|
5
7
|
<div align="center">
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
</
|
|
9
|
-
<
|
|
10
|
-
<a href="https://capgo.app/consulting/?ref=plugin_inappbrowser">
|
|
11
|
-
{' '}
|
|
12
|
-
Missing a feature? We’ll build the plugin for you 💪
|
|
13
|
-
</a>
|
|
14
|
-
</h2>
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_inappbrowser">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_inappbrowser">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
15
12
|
</div>
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-inappbrowser/main/assets/iab-layer-controls-demo.webp" alt="iOS example app showing a web page in the native browser with an Ionic overlay rendered above it" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Two browser modes**: `open()` uses SFSafariViewController on iOS and Chrome Custom Tabs on Android, `openWebView()` opens a WebView with your own toolbar, title, colors and buttons.
|
|
21
|
+
- **Two-way messaging**: `postMessage()` and the `messageFromWebview` event, plus `executeScript()` to run code in the page.
|
|
22
|
+
- **Navigation events**: `urlChangeEvent`, `browserPageLoaded`, `pageLoadError`, `closeEvent`, downloads and popups.
|
|
23
|
+
- **Layout control**: `updateDimensions()`, fullscreen, safe-area margins, `hide()`, `show()` and `sendToBack()` to place the browser behind your Ionic UI.
|
|
24
|
+
- **Session data**: `getCookies()`, `clearCookies()`, `clearCache()` and `clearAllBrowsingData()`.
|
|
25
|
+
- **OAuth**: `openSecureWindow()` runs an auth flow with ASWebAuthenticationSession on iOS and Custom Tabs on Android, and a popup on web.
|
|
26
|
+
- **Platforms**: iOS and Android. On web only `openSecureWindow()` and a few helpers do real work.
|
|
18
27
|
|
|
19
28
|
## Why InAppBrowser?
|
|
20
29
|
|
|
@@ -146,7 +155,7 @@ const { id } = await InAppBrowser.openWebView({
|
|
|
146
155
|
});
|
|
147
156
|
```
|
|
148
157
|
|
|
149
|
-
Android already shares cookies process-wide, so this flag is a no-op there. Do not enable it unless you need host session sharing
|
|
158
|
+
Android already shares cookies process-wide, so this flag is a no-op there. Do not enable it unless you need host session sharing, clearing cookies/cache for that webview can affect the host WebView on iOS.
|
|
150
159
|
|
|
151
160
|
#### Keep multiple browser instances ready
|
|
152
161
|
|
|
@@ -446,7 +446,7 @@ public class CapgoInAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
446
446
|
case aware = "AWARE"
|
|
447
447
|
case fakeVisible = "FAKE_VISIBLE"
|
|
448
448
|
}
|
|
449
|
-
private let pluginVersion: String = "8.21.
|
|
449
|
+
private let pluginVersion: String = "8.21.2"
|
|
450
450
|
public let identifier = "CapgoInAppBrowserPlugin"
|
|
451
451
|
public let jsName = "CapgoInAppBrowser"
|
|
452
452
|
public let pluginMethods: [CAPPluginMethod] = [
|