JsBridge
JsBridge copied to clipboard
Working with https web pages
Hi,
We are using JsBridge Unified library on Xamarin iOS app to communicate between web page and native functionality. We have a UIWebView which renders a web page and it invokes camera from device to scan a bar code. The library was working fine until we were serving http pages. Recently, we changed them to https and now it is not firing AddEventListener function to invoke camera.
Does this library prevents calls coming from https? Do we need to make any change in the app handle https requests? I also added NSAllowsArbitraryLoads = True flag in Info.plist We really appreciate your help Thanks
I'm not aware of any problems over https but I haven't used this library personally in years.
How are you registering the browser side script? Make sure it's getting registered and isn't blocked by loading it over http on an https page.
I guess we are already registering the script
Here is the actual error we saw
Thanks
Hmmm, it's blocking the custom protocol app://
I don't know a way to configure the WebView to ignore that, unfortunately.
You could look into modifying things so it makes calls to https://yoursite.com/App/fireEvent
and then try detect when that Url is accessed instead of relying on the custom url scheme.