Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Communicating between two windows - React Native - Post Message

$
0
0

I work on a sales application and we have recently started using a 3rd party iOS app as a container for our react-native web app and I was wonder if it is possible to communicate between the two applications.

The developer for the iOS app suggested the following command to enable our app to close and go back to their app:

<a href="#" onclick="window.webkit.messageHandlers.webView.postMessage({'action':'back'}); return false; ">Go Back</a>

Obviously I had to convert this in to react sort of notation so end up something like this:

enter image description here

Is there some sort of package I need to download in order to have the WebKit dependencies as WebKit was not an option?

The developer for the application says that their iOS app should receive the action and take necessary action based on the parameter 'action' but I have not managed to get the intended results and he hasn't been able to help me with the issue so far.

Does anyone have experience with postMessage between iOS and react web apps?

Appreciate any help


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>