Sun, 28 Feb 2021 08:34:27 GMT
Join the conversation at slack.cordova.io
Sat, 27 Feb 2021 14:00:54 GMT
@sinan.demir says
Hello to everyone,
Thank you so much @norman137 for your answer (https://github.com/apache/cordova-ios/issues/1086|1086). I want to ask a few more questions.
We manage the user's session with http://asp.net|asp.net session object. Chrome, Safari and Android WebView add the http://ASP.NET|ASP.NET_SessionId value that comes with the set-cookie from the server to the header in every request. IOS WKWebView does not add http://ASP.NET|ASP.NET_SessionId value to header.
I mentioned it before. We compile and publish a single application. Users download our application and connect to the service address published on their server.
For this reason, the settings we will make in config.xml have not been a solution for us.
<preference name = "hostname" value = "localhost" />``` I looked for a solution to update the hostname at runtime. What would be the most logical solution in your opinion? (<https://github.com/GEDYSIntraWare/cordova-plugin-webview-switch|cordova-plugin-webview-switch>) ```WebviewSwitch.setHostname ('<http://myserver.com|myserver.com>')``` Thank you for your help.
Sat, 27 Feb 2021 21:42:47 GMT
@slackbot says
This message was deleted.
Sun, 28 Feb 2021 05:48:36 GMT
@simunovics says
I am making folium maps with popup windows using branca IFrame. I embed hyperlinks in popup windows to open new browser windows. I would like to use cordova to deploy the maps on ios. For that, I tried to use
cordova.InAppBrowser.open
with IFrame as:html=""" <!DOCTYPE html> <body> <h1>Popup</h1><br> <p> Something something <a href="#" onclick="window.open = cordova.InAppBrowser.open; window.open('<https://www.mit.edu>', '_system','location=yes');">Open link</a> </p> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/index.js"></script> </body> </html>""" iframe = branca.element.IFrame(html=html, width=400, height=250) popup = folium.Popup(iframe, parse_html=True) folium.Marker( location=[46.216, -124.1280], popup=popup ).add_to(m) m.save('index.html')``` However, whatever I do, and wherever I add `<script>` entries with `cordova.js` in `index.html`, I always get an error: `Can't find variable: cordova` Everything works ok when I use `folium.Html` to create hyperlinks instead of `branca.element.IFrame`, but that works for me only for short/simple HTML objects. In that case, adding: ``` <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/index.js"></script>``` in the header of `index.html` document, does the job. When using `folium.Html` there are no IFrames and that seems to be the key. Any pointers will be highly appreciated.
Sat, 27 Feb 2021 19:03:48 GMT
@simunovics says
I have a question on syntax of replacing
window.open()
withcordova.InAppBrowser.open()
as described in <https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html> Being new to JS and Cordova, I thought the assignment would be as simple as putting in the html header:<script type="text/javascript" src="js/index.js"></script> <script> window.open = cordova.InAppBrowser.open; </script>``` But that does not work. I get desired behavior on ios for Link 2 but not Link 1 ```<button onclick="window.open('<https://www.google.com>', '_system')">Open Link 1</button> <button onclick="cordova.InAppBrowser.open('<https://www.google.com>', '_system')">Open Link 2</button>``` Any suggestions will be appreciated. Just figured out that `<button onclick="window.open = cordova.InAppBrowser.open; window.open('<https://www.google.com>', '_system')">Open Link 1</button>` works out. Is this how it is supposed to be used?