Load local website from the Documents folder in iPhone using phonegap?
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 folde开发者_StackOverflowr 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.
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..
精彩评论