JsBridge icon indicating copy to clipboard operation
JsBridge copied to clipboard

Working with https web pages

Open mobiledev1600 opened this issue 8 years ago • 3 comments

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

mobiledev1600 avatar Mar 24 '16 14:03 mobiledev1600

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.

cdeutsch avatar Mar 24 '16 15:03 cdeutsch

I guess we are already registering the script

Here is the actual error we saw screen shot 2016-03-24 at 3 11 48 pm

Thanks

mobiledev1600 avatar Mar 24 '16 20:03 mobiledev1600

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.

cdeutsch avatar Mar 24 '16 20:03 cdeutsch