Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
In cordova-ios>4.0, allow default handling for whitelist - breaks the…
Browse files Browse the repository at this point in the history
… previous behavior of opening non-whitelisted URLs in the browser
  • Loading branch information
f2bo committed Jun 2, 2016
1 parent 61045c7 commit 572ce78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ios/CDVHostedWebApp.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "CDVHostedWebApp.h"
#import <Cordova/CDV.h>
#import <Cordova/CDVAvailability.h>
#import "CDVConnection.h"

static NSString* const IOS_PLATFORM = @"ios";
Expand Down Expand Up @@ -473,6 +474,7 @@ - (void)didWebViewFailLoadWithError:(NSNotification*)notification
}
}

#ifndef __CORDOVA_4_0_0
- (BOOL) shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL* url = [request URL];
Expand All @@ -488,6 +490,7 @@ - (BOOL) shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UI

return NO;
}
#endif

-(BOOL) shouldAllowNavigation:(NSURL*) url
{
Expand Down

0 comments on commit 572ce78

Please sign in to comment.