I have a UiWebView that is pointing to an external site that has a session expiration of 30 minutes of inactivity. In my app, I have a custom login page embedded in the app
I think you will need to handle the file:// protocol in a UIWebView delegate method. eg.
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
// Intercept the external http requests and forward to Safari.app
// Otherwise forward to the PhoneGap WebView
if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"]) {
[[UIApplication sharedApplication] openURL:url];
return NO;
}
else {
return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];
}
}
In your case, tell the delegate method what to do with your url scheme. eg.
if ([url.scheme isEqualToString:@"file"]) {
NSLog(@"Open start page");
[[UIApplication sharedApplication] openURL:url];
return NO;
}
Not sure if this will work for you, but hopefully it will provide a path to the solution.