[ 
https://issues.apache.org/jira/browse/CB-7539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139884#comment-14139884
 ] 

Liming Xie commented on CB-7539:
--------------------------------

I am for the proposal to embed a local web server into cordova. it will benefit 
a lot to HTML5 games. 

With the WebGL and WKWebView introduced in iOS8, and the Android L, HTML5 game 
performance is largely improved. The era for HTML5 on mobile phone is coming.

The only bottleneck is the AJAX and domain issue. As resources are loaded via 
AJAX, canvas domain is also restricted for security reason. For example, the 
most popular phaser.js game engine, a httpd is always required. If this issue 
can be solved, it will largely change the HTML5 mobile game ecosystem.

I've implemented a plugin to embed a tiny webserver into Cordova, 
CocoaHTTPServer (iOS) and NanoHTTPD (java) are used in the plugin. It's being 
used by Meteor.
https://github.com/floatinghotpot/cordova-httpd

There are quite a few app to have local httpd embeded. I guess the app review 
is not a blocking issue. On the other hand, the security control on remote 
access need be carefully designed of course.

If needed, maybe I can contribute some effort to this feature.



> [WKWebView][iOS 8] Use local webserver option to load local HTML file from www
> ------------------------------------------------------------------------------
>
>                 Key: CB-7539
>                 URL: https://issues.apache.org/jira/browse/CB-7539
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Blocker
>
> This workaround is because of this bug:
> http://www.openradar.me/radar?id=5839348817723392
> (filed with Apple of course also)
> I'm still hoping that Apple fixes this in iOS 8.1, but we should have this as 
> a contingency plan.
> Create this as an included plugin, so it can be extracted later if need be.
> We need to secure access to the local webserver, probably through a session 
> token in the header, since background apps can have access to the webserver. 
> The session token is passed down to the initially loaded local page specified 
> from the <content> tag in config.xml, and should be used in the cordova.exec 
> call. We would also need to implement local proxy support , see CB-7348
> This all sounds more complex than it needs to be than just loading a file url 
> -- wishing Apple would just fix this in iOS 8.1 instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to