Cordova / Phonegap iOS - how to run app index.html from the external Documents folder

We are trying to implement a webapp resource update without updating the application itself.

I load assets into the Documents / some / path / name folder and try to run the application from this folder.

But the application log shows that .../Documents/..../index.html not found.

Here is my sample code:

 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"; 

How can I run the cordova application from the application folder for the application?

  downloaded assets path: / var / mobile / Applications / {App-HASH} / Documents / revisions / 123 / 

This is the magazine magazine Orgamizer:

  ERROR: Start Page at '/var/mobile/Applications/10E317FA-CD51-4DD1-A07D-3C69EB4C5342/Documents/appname/790/index.html' was not found. 
+4
source share

Source: https://habr.com/ru/post/1484607/


All Articles