ionic-team / ionic-team/cordova-plugin-ionic-webview
Ionic WKWebview doesn't load start page - halts at white screen
- Dominant language
- Objective-C
- Stars
- 493
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
I was constantly seeing the white screen on using absolute paths for setting **viewController.startPage**
I did as suggested in [issue 195](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/195) and it started working.
Now the problem is, in our app, this path to html file may change upon receiving some updates from our server. So how to handle this scenario?
I have tried the following as suggested by @jcesarmobile :
```
@implementation AppDelegate
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
NSString* fileLocation = [[LibraryClass sharedInstance] mainHtmlFilePath];
CDVWKWebViewEngine* temp;
[temp setServerPath:fileLocation];
self.viewController = [[MainViewController alloc] init];
self.viewController.startPage = @"home.html";
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
```
But it doesn't seem to work.
To rephrase what we really want: Our **fileLocation** value may change during runtime and we may require to reload the **self.viewController** with a new **startPage**. How to approach this?
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.