diff --git a/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.h b/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.h deleted file mode 100755 index fbda2a1d6..000000000 --- a/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// IASKAppSettingsWebViewController.h -// http://www.inappsettingskit.com -// -// Copyright (c) 2009: -// Luc Vandal, Edovia Inc., http://www.edovia.com -// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com -// All rights reserved. -// -// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, -// as the original authors of this code. You can give credit in a blog post, a tweet or on -// a info page of your app. Also, the original authors appreciate letting them know if you use this code. -// -// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php -// - -#import -#import - -@interface IASKAppSettingsWebViewController : UIViewController { - UIWebView *webView; - NSURL *url; -} - -- (id)initWithFile:(NSString*)htmlFileName key:(NSString*)key; - -@property(nonatomic, strong) UIWebView *webView; -@property(nonatomic, strong) NSURL *url; - -@end diff --git a/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m b/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m deleted file mode 100755 index 7e1df0b70..000000000 --- a/Classes/Utils/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m +++ /dev/null @@ -1,150 +0,0 @@ -// -// IASKAppSettingsWebViewController.h -// http://www.inappsettingskit.com -// -// Copyright (c) 2010: -// Luc Vandal, Edovia Inc., http://www.edovia.com -// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com -// All rights reserved. -// -// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, -// as the original authors of this code. You can give credit in a blog post, a tweet or on -// a info page of your app. Also, the original authors appreciate letting them know if you use this code. -// -// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php -// - -#import "IASKAppSettingsWebViewController.h" -#pragma deploymate push "ignored-api-availability" -@implementation IASKAppSettingsWebViewController - -@synthesize url; -@synthesize webView; - -- (id)initWithFile:(NSString*)urlString key:(NSString*)key { - self = [super init]; - if (self) { - self.url = [NSURL URLWithString:urlString]; - if (!self.url || ![self.url scheme]) { - NSString *path = [[NSBundle mainBundle] pathForResource:[urlString stringByDeletingPathExtension] ofType:[urlString pathExtension]]; - if(path) - self.url = [NSURL fileURLWithPath:path]; - else - self.url = nil; - } - } - return self; -} - -- (void)loadView -{ - webView = [[UIWebView alloc] init]; - webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | - UIViewAutoresizingFlexibleHeight; - webView.delegate = self; - - self.view = webView; -} - -- (void)dealloc { - webView = nil; - url = nil; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [webView loadRequest:[NSURLRequest requestWithURL:self.url]]; -} - -- (void)viewDidUnload { - [super viewDidUnload]; - self.webView = nil; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return YES; -} - -- (void)webViewDidFinishLoad:(UIWebView *)webView { - self.navigationItem.title = [self.webView stringByEvaluatingJavaScriptFromString:@"document.title"]; -} - -- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { - NSURL *newURL = [request URL]; - - // intercept mailto URL and send it to an in-app Mail compose view instead - if ([[newURL scheme] isEqualToString:@"mailto"]) { - - NSArray *rawURLparts = [[newURL resourceSpecifier] componentsSeparatedByString:@"?"]; - if (rawURLparts.count > 2) { - return NO; // invalid URL - } - - MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; - mailViewController.mailComposeDelegate = self; - - NSMutableArray *toRecipients = [NSMutableArray array]; - NSString *defaultRecipient = [rawURLparts objectAtIndex:0]; - if (defaultRecipient.length) { - [toRecipients addObject:defaultRecipient]; - } - - if (rawURLparts.count == 2) { - NSString *queryString = [rawURLparts objectAtIndex:1]; - - NSArray *params = [queryString componentsSeparatedByString:@"&"]; - for (NSString *param in params) { - NSArray *keyValue = [param componentsSeparatedByString:@"="]; - if (keyValue.count != 2) { - continue; - } - NSString *key = [[keyValue objectAtIndex:0] lowercaseString]; - NSString *value = [keyValue objectAtIndex:1]; - - value = (NSString *)CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - kCFAllocatorDefault, (CFStringRef)value, CFSTR(""), kCFStringEncodingUTF8)); - - if ([key isEqualToString:@"subject"]) { - [mailViewController setSubject:value]; - } - - if ([key isEqualToString:@"body"]) { - [mailViewController setMessageBody:value isHTML:NO]; - } - - if ([key isEqualToString:@"to"]) { - [toRecipients addObjectsFromArray:[value componentsSeparatedByString:@","]]; - } - - if ([key isEqualToString:@"cc"]) { - NSArray *recipients = [value componentsSeparatedByString:@","]; - [mailViewController setCcRecipients:recipients]; - } - - if ([key isEqualToString:@"bcc"]) { - NSArray *recipients = [value componentsSeparatedByString:@","]; - [mailViewController setBccRecipients:recipients]; - } - } - } - - [mailViewController setToRecipients:toRecipients]; - - [self presentModalViewController:mailViewController animated:YES]; - return NO; - } - - // open inline if host is the same, otherwise, pass to the system - if (![newURL host] || [[newURL host] isEqualToString:[self.url host]]) { - return YES; - } - [[UIApplication sharedApplication] openURL:newURL]; - return NO; -} - -- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { - [self dismissModalViewControllerAnimated:YES]; -} -#pragma deploymate pop - -@end diff --git a/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m index d66a1eadd..90c966ba7 100755 --- a/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m +++ b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m @@ -215,7 +215,6 @@ if ( [view isKindOfClass:[UISlider class]] || [view isKindOfClass:[UISwitch class]] || [view isKindOfClass:[UITextField class]] || - [view isKindOfClass:[UIWebView class]] || [view isKindOfClass:[UITableView class]] || [view isKindOfClass:[UIPickerView class]] || [view isKindOfClass:[UIDatePicker class]] || diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 4f0b95321..c4ad412df 100644 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -759,7 +759,6 @@ D3807FC315C28940005BE9BC /* DCRoundSwitchOutlineLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FBC15C28940005BE9BC /* DCRoundSwitchOutlineLayer.m */; }; D3807FC515C28940005BE9BC /* DCRoundSwitchToggleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FBE15C28940005BE9BC /* DCRoundSwitchToggleLayer.m */; }; D3807FE815C2894A005BE9BC /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FCA15C2894A005BE9BC /* IASKAppSettingsViewController.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations -Wno-objc-designated-initializers"; }; }; - D3807FEA15C2894A005BE9BC /* IASKAppSettingsWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FCC15C2894A005BE9BC /* IASKAppSettingsWebViewController.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; D3807FEC15C2894A005BE9BC /* IASKSpecifierValuesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FCE15C2894A005BE9BC /* IASKSpecifierValuesViewController.m */; }; D3807FEE15C2894A005BE9BC /* IASKSettingsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FD215C2894A005BE9BC /* IASKSettingsReader.m */; }; D3807FF015C2894A005BE9BC /* IASKSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FD415C2894A005BE9BC /* IASKSettingsStore.m */; }; @@ -1818,8 +1817,6 @@ D3807FBE15C28940005BE9BC /* DCRoundSwitchToggleLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCRoundSwitchToggleLayer.m; sourceTree = ""; }; D3807FC915C2894A005BE9BC /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = ""; }; D3807FCA15C2894A005BE9BC /* IASKAppSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsViewController.m; sourceTree = ""; }; - D3807FCB15C2894A005BE9BC /* IASKAppSettingsWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsWebViewController.h; sourceTree = ""; }; - D3807FCC15C2894A005BE9BC /* IASKAppSettingsWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsWebViewController.m; sourceTree = ""; }; D3807FCD15C2894A005BE9BC /* IASKSpecifierValuesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifierValuesViewController.h; sourceTree = ""; }; D3807FCE15C2894A005BE9BC /* IASKSpecifierValuesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifierValuesViewController.m; sourceTree = ""; }; D3807FCF15C2894A005BE9BC /* IASKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKViewController.h; sourceTree = ""; }; @@ -3222,8 +3219,6 @@ children = ( D3807FC915C2894A005BE9BC /* IASKAppSettingsViewController.h */, D3807FCA15C2894A005BE9BC /* IASKAppSettingsViewController.m */, - D3807FCB15C2894A005BE9BC /* IASKAppSettingsWebViewController.h */, - D3807FCC15C2894A005BE9BC /* IASKAppSettingsWebViewController.m */, D3807FCD15C2894A005BE9BC /* IASKSpecifierValuesViewController.h */, D3807FCE15C2894A005BE9BC /* IASKSpecifierValuesViewController.m */, D3807FCF15C2894A005BE9BC /* IASKViewController.h */, @@ -4513,7 +4508,6 @@ D3807FC515C28940005BE9BC /* DCRoundSwitchToggleLayer.m in Sources */, 633E41821D74259000320475 /* AssistantLinkView.m in Sources */, D3807FE815C2894A005BE9BC /* IASKAppSettingsViewController.m in Sources */, - D3807FEA15C2894A005BE9BC /* IASKAppSettingsWebViewController.m in Sources */, D3807FEC15C2894A005BE9BC /* IASKSpecifierValuesViewController.m in Sources */, 8CA70AE41F9E39E400A3D2EB /* UIChatConversationInfoTableViewCell.m in Sources */, D3807FEE15C2894A005BE9BC /* IASKSettingsReader.m in Sources */,