Javascript 如何使用cordova处理ios中下载的插件文件夹

Javascript 如何使用cordova处理ios中下载的插件文件夹,javascript,ios,cordova,Javascript,Ios,Cordova,我是一名iOS开发人员,现在我想使用cordova开发web。当www文件夹在捆绑包中时,我知道如何使用cordova。但是,我想将www文件夹从远程服务器下载到本地沙箱中(例如,/Documents)。现在我是小姐 我尝试按如下方式打开html文件: CDVViewController *controller = [[CDVViewController alloc] init]; controller.wwwFolderName = @"file://~/Documents/www"; con

我是一名iOS开发人员,现在我想使用cordova开发web。当www文件夹在捆绑包中时,我知道如何使用cordova。但是,我想将www文件夹从远程服务器下载到本地沙箱中(例如,/Documents)。现在我是小姐

我尝试按如下方式打开html文件:

CDVViewController *controller = [[CDVViewController alloc] init];
controller.wwwFolderName = @"file://~/Documents/www";
controller.startPage = @"index.html";
[self.navigationController pushViewController:controller animated:YES];
但它不能正常工作。它似乎调用了js函数(我在页面中添加了一个alert()调用),但是html内容没有显示出来


为什么?

您可以在iOS应用程序中使用Cordova作为组件。该部件代号为“劈刀”

如果要在本机中使用来显示index.html,则需要使用cordova webview