Skip to content

Commit 62ccdd7

Browse files
committed
fix(ionic): Add workaround for Ionic WebView plugin
Closes apacheGH-1631.
1 parent 6a130fd commit 62ccdd7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,19 @@ - (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(CDV
148148
return [[self class] shouldOverrideLoadWithRequest:request navigationType:navigationType filterValue:[self filterUrl:request.URL]];
149149
}
150150

151+
#pragma clang diagnostic push
152+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
153+
// TODO: Remove in Cordova iOS 9
154+
// The Ionic Webview plugin calls this method by selector (rather than
155+
// shouldOverrideLoadWithRequest:navigationType:info: as defined above) and
156+
// apps using that plugin break by refusing to load content unless this
157+
// deprecated selector exists.
158+
- (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(CDVWebViewNavigationType)navigationType
159+
{
160+
NSLog(@"Plugin called shouldOverrideLoadWithRequest:navigationType: which is deprecated and will be removed in Cordova iOS 9");
161+
162+
return [[self class] shouldOverrideLoadWithRequest:request navigationType:navigationType filterValue:[self filterUrl:request.URL]];
163+
}
164+
#pragma clang diagnostic pop
165+
151166
@end

0 commit comments

Comments
 (0)