开发者

Is PhoneGap on iPhone pointed to local proxy possible and allowed?

We are looking on building a project that would run on Android, iPhone and other platforms with Phonegap. The app would be fairly simply, making use of the camera and basic UI features. The first versions would simply point to a web service and load information from there. Over time, however, we want to improve the speed by:

1.) Downloading content via a separate thread when the app is running and storing the results in a local database,

2.) Hosting a min开发者_开发技巧i webserver in the app*, and

3.) Pointing the PhoneGap UI to the app's mini webserver instead of the service's external webserver.

Two questions:

1.) Is it technically possible to host a mini webserver in iPhone that the app will access?

2.) Would this functionality be rejected by Apple?

Thanks in advance.

*I realize this step probably isn't really necessary. But, if it enables to truly build a "write-once-run-anywhere" UI, it might make sense still.


You're much more likely to want to have the HTML for presentation generated on your actual server, downloaded and stored by your separate thread as an .html file on the iPhone filesystem and served through local URLs using PhoneGap. Essentially, an advanced cache.

This way no web-server is necessary and you only need to write the UI generation code once on the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜