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

XWebView should expose port number or receive a preferred port number #24

Open
fernandodev opened this issue Oct 21, 2015 · 1 comment

Comments

@fernandodev
Copy link
Contributor

I think in some cases is conviniente to retrieve current port number of local http server or maybe a way to preset it (I know it can conflict but it's an embedded server maybe it shouldn't occur)

Other point is when use more than one WKWebView instance (like in a page view controller). Is really necessary to instantiate one http server for each instance, I don't think so. For this case I suppose that is better to extract http server in a singleton or any other pattern.

But with a preferred port number can solve both of them because if server is already running they should not start again. A common problem can be the case when have more than one base Urls ... but it's more a project question than a problem et al

@xwv
Copy link
Contributor

xwv commented Dec 18, 2015

Sorry for reply late.

The http server is intent to be transparent to embedders by design. However, I can be convinced if you have a reasonable case that indeed requires to know the port number.

Multiple WKWebView instances can share a same http server, but it means they share the same resource directory. This may cause security issues.

The iOS 8 support is expected to be removed in a seeable future. The http server will serve for overlay support only. If we can find a better approach to implement overlay (like URL intercept), I will remove the http server also.

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

No branches or pull requests

2 participants