我们正试图在不更新应用程序本身的情况下实现webapp资产的更新。
我将资源下载到Documents / some / path / name文件夹并尝试从此文件夹启动应用程序。
但应用程序日志显示找不到.../Documents/..../index.html
。
这是我的代码示例:
NSString *wwwFolderName = @"web";
if ([directoryList count] > 0) {
NSArray *sortedDirectoryList = [directoryList sortedArrayUsingSelector:@selector(compare:)];
NSString *latestVersionFolder = [sortedDirectoryList objectAtIndex:([sortedDirectoryList count] - 1)];
wwwFolderName = [appDirectory stringByAppendingPathComponent:latestVersionFolder];
}
// end of assets directory initialization
self.viewController = [[MainViewController alloc] init];
self.viewController.useSplashScreen = YES;
self.viewController.wwwFolderName = wwwFolderName;
self.viewController.startPage = @"index.html";
如何从Documents的应用专用文件夹启动cordova应用程序?
downloaded assets path: /var/mobile/Applications/{App-HASH}/Documents/revisions/123/
这是Orgamizer日志显示的内容:
ERROR: Start Page at '/var/mobile/Applications/10E317FA-CD51-4DD1-A07D-3C69EB4C5342/Documents/appname/790/index.html' was not found.