PhoneGap的 - 更新JavaScript和CSS没有提交应用的AppStore [英] Phonegap - Updating JavaScript and CSS without submitting the app to appStore

查看:139
本文介绍了PhoneGap的 - 更新JavaScript和CSS没有提交应用的AppStore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能更新WWW文件夹的PhoneGap的内容没有提交每次更改时间的AppStore应用程序?
是否有任何法律问题呢?

Is it possible to update the content of WWW folder in phonegap without submitting the app every time you make changes to appStore? Is there any legal issue with it?

推荐答案

简短的回答 - 是的,你可以 - 但你需要搬迁WWW之前,你可以写入

Short answer - yes, you can - but you need to relocate www before you can write to it.

龙答案 - 收紧你的短裤朝圣者,这可能会颠簸....

Long answer - tighten up your shorts pilgrim, this might get bumpy....

所以,当您打包的应用程序,该应用程序包包含您的www目录,所有的PG自包含的Web应用程序的各种杂件。一切是该应用包的一部分是静态 - 因此它不能被写入。你可以,但是,请写信给NSDocumentDirectory您的应用程序 - 它是私有的沙盒存储区域

So, when you package your app, the app bundle contains your www directory and all of the various and sundry parts of your PG self contained web app. Everything that is part of the app bundle is static - so it cannot be written to. You can, however, write to the NSDocumentDirectory for your application - it's private sandboxed storage area.

第一步是要(在发射)复制您的www文件夹到NSDocumentDirectory。

The first step is to (upon launch) copy your www folder into the NSDocumentDirectory.

其次,你需要重写CDVCommandDelegateImpl pathForResource方法,以便在新的WWW位置指向PG。

Second, you'll need to override the CDVCommandDelegateImpl pathForResource method in order to point PG at the new www location.

在这一点上你的应用程序应该运行它时,应用程序包内包含的那样。一个值得注意的例外是,每个文件现在可以修改

At this point your app should be operating as it did when contained within the app bundle. One notable exception is that each of the files can now be modified.

我的应用程序是基础产品,可以有附加内容。如果我包括了所有的附加内容,应用程序将几百MB的大小。所以,我有跟单(样本)数据包中的基本应用,并根据用户的需要延长产品,他们选择哪下载,抽取并复制到www文件夹下的相应子目录,因为它的存在额外的数据包NSDocumentDirectory。

My app is a base product which can have add-on content. If I included all of the add-on content, the app would be several hundred MB in size. So, I include the basic app with a single (sample) data package, and as users need to extend the product, they select additional data packages which are downloaded, extracted and copied into the appropriate subdirectory of the www folder as it exists in the NSDocumentDirectory.

作为奖励,如果我发现在HTML中的错误 - 或者想添加一个功能,我可以这样做,而不重新提交应用程序。唯一的原因,我需要重新提交应用程序是,如果有一个Objective-C修正错误。

As a bonus, if I find a bug in HTML - or want to add a feature, I can do so without resubmitting the app. The only reason I need to resubmit the app is if there is an Objective-C bugfix.

这篇关于PhoneGap的 - 更新JavaScript和CSS没有提交应用的AppStore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆