Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with https web pages #10

Open
mobiledev1600 opened this issue Mar 24, 2016 · 3 comments
Open

Working with https web pages #10

mobiledev1600 opened this issue Mar 24, 2016 · 3 comments

Comments

@mobiledev1600
Copy link

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

@cdeutsch
Copy link
Owner

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.

@mobiledev1600
Copy link
Author

I guess we are already registering the script

<script type="text/javascript" src="scripts/mt.js"></script>

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

Thanks

@cdeutsch
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants