From c623466b01da346cafe5cdd1039ed608326d9a5c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 4 Nov 2014 23:51:28 -0800 Subject: Try harder to block all iTunes-related redirects. --- CyteKit/WebViewController.mm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CyteKit') diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index f1448e1..33524f3 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -462,7 +462,17 @@ float CYScrollViewDecelerationRateNormal; #endif NSURL *url(request == nil ? nil : [request URL]); - if ([[url scheme] isEqualToString:@"itms-appss"] || [[url absoluteString] hasPrefix:@"https://itunes.apple.com/app/"]) { + NSString *scheme([[url scheme] lowercaseString]); + NSString *absolute([[url absoluteString] lowercaseString]); + + if ( + [scheme isEqualToString:@"itms"] || + [scheme isEqualToString:@"itmss"] || + [scheme isEqualToString:@"itms-apps"] || + [scheme isEqualToString:@"itms-appss"] || + [absolute hasPrefix:@"http://itunes.apple.com/"] || + [absolute hasPrefix:@"https://itunes.apple.com/"] || + false) { appstore_ = url; UIAlertView *alert = [[[UIAlertView alloc] -- cgit v1.2.3