views:

45

answers:

1

Hi,

We're making an app using phonegap to load it locally. Everything is working fine, the problem is that our manager asked us to find a way of update the whole site (if necesary) from internet and replace the old one. So far I created one method to do it when the website is copied to the Documents folder but I found that the 'www' site folder is loaded from the bundle of the application and in iPhone is not possible to modify files inside the folder.

Some say it would not be permitted to do such a thing like changing substantial parts of the application this way...

Please, do you know any approach to solve this? thanks in advance.

+1  A: 

Your app will be rejected, if not right away, at a later date - you are changing the whole app after all. All app updates need to be reviewed by Apple.

Phonegap loads index.html in the www folder. All you need to do is change the appropriate location in the AppDelegate. You could always do ../../Documents/foo.html - try that out, or something similar..

Shazron
Thanks Shazron!, Really sorry if I'm too reiterative but I just want to be sure, have you heard about something similar to update the entire app through internet before?, here's a question that I posted and though it was targeted to another issue, they didn't give this warning. http://stackoverflow.com/questions/3677632/is-it-permited-to-download-javascript-code-to-iphone
iPhoneDevProf