Gabe
Gabe

Reputation: 6347

Share data between webviews in hybrid App

I have a React web application running in an hybrid App (wrapped inside a webview) using Cordova.

In the application there are links to a different domain that we open within the same App using <allow-navigation href="https://*.domain.com/*" />.

Is there a cross-platform way to share data between webviews opened within the same App without having to go through an external server?

Upvotes: 0

Views: 548

Answers (1)

DaveAlden
DaveAlden

Reputation: 30366

I would recommend the inappbrowser approach, because if you navigate the main Cordova webview away from the index.html your app has lost its state - it's no longer a Cordova hybrid app, just a wrapped web page.

Bi-directional communication between the main app webview and inappbrowser webview (on Android & iOS) is now possible due to this PR being merged.

Upvotes: 1

Related Questions