diff --git a/src/ios/CDVHostedWebApp.m b/src/ios/CDVHostedWebApp.m index 12a19a0..11290eb 100644 --- a/src/ios/CDVHostedWebApp.m +++ b/src/ios/CDVHostedWebApp.m @@ -89,8 +89,8 @@ - (void)pluginInitialize // set the webview delegate to notify navigation events notificationDelegate = [[CVDWebViewNotificationDelegate alloc] init]; - notificationDelegate.wrappedDelegate = self.webView.delegate; - [self.webView setDelegate:notificationDelegate]; + notificationDelegate.wrappedDelegate = ((UIWebView*)self.webView).delegate; + [(UIWebView*)self.webView setDelegate:notificationDelegate]; id offlineFeature = [manifest objectForKey:@"mjs_offline_feature"]; if (offlineFeature != nil && [offlineFeature boolValue] == NO) { @@ -221,7 +221,7 @@ -(BOOL) injectScripts:(NSArray *)scriptList { } } - return[self.webView stringByEvaluatingJavaScriptFromString:content] != nil; + return[(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:content] != nil; } - (BOOL) isCordovaEnabled @@ -304,7 +304,7 @@ -(BOOL) isMatchingRuleForPage:(NSDictionary*) rule withPlatformCheck: (BOOL) che if (match != nil) { CDVWhitelist *whitelist = [[CDVWhitelist alloc] initWithArray:match]; - NSURL* url = self.webView.request.URL; + NSURL* url = ((UIWebView*)self.webView).request.URL; isURLMatch = [whitelist URLIsAllowed:url]; } } @@ -361,7 +361,7 @@ - (void)updateConnectivityStatus:(NSNotification*)notification } else { if (self.failedURL) { - [self.webView loadRequest: [NSURLRequest requestWithURL: self.failedURL]]; + [(UIWebView*)self.webView loadRequest: [NSURLRequest requestWithURL: self.failedURL]]; } else { [self.offlineView setHidden:YES]; @@ -417,7 +417,7 @@ - (void)webViewDidFinishLoad:(NSNotification*)notification } NSString* javascript = [NSString stringWithFormat:@"window.hostedWebApp = { 'platform': '%@', 'pluginMode': '%@', 'cordovaBaseUrl': '%@'};", IOS_PLATFORM, pluginMode, cordovaBaseUrl]; - [self.webView stringByEvaluatingJavaScriptFromString:javascript]; + [(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:javascript]; NSMutableArray* scripts = [[NSMutableArray alloc] init]; if ([pluginMode isEqualToString:@"client"])