diff --git a/iphone/Maps/Bookmarks/BookmarkCell.mm b/iphone/Maps/Bookmarks/BookmarkCell.mm index 0495f86327..a379c60cfd 100644 --- a/iphone/Maps/Bookmarks/BookmarkCell.mm +++ b/iphone/Maps/Bookmarks/BookmarkCell.mm @@ -63,7 +63,7 @@ CGFloat xDelim = (int)(r.origin.x + w / 2); if (_bmDistance.text.length) { - CGSize const distanceTextSize = [_bmDistance.text sizeWithFont:_bmDistance.font]; + CGSize const distanceTextSize = [_bmDistance.text sizeWithAttributes:@{NSFontAttributeName:_bmDistance.font}]; if (xDelim + distanceTextSize.width < r.origin.x + w) xDelim = r.origin.x + w - distanceTextSize.width - KPaddingX; } diff --git a/iphone/Maps/Bookmarks/BookmarksRootVC.mm b/iphone/Maps/Bookmarks/BookmarksRootVC.mm index 5e98c3c752..ad3a85ed21 100644 --- a/iphone/Maps/Bookmarks/BookmarksRootVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksRootVC.mm @@ -136,7 +136,8 @@ if ([string length] < tailLength + incrementStep) return string; BOOL firstTime = YES; - while ([string sizeWithFont:font].width > width) + NSDictionary * attrs = @{NSFontAttributeName:font}; + while ([string sizeWithAttributes:attrs].width > width) { if (!firstTime) string = [[string substringToIndex:([string length] - tailLength - incrementStep)] stringByAppendingString:@"..."]; diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 15b6d22c63..34f6bcaae7 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -284,7 +284,7 @@ - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { - [self dismissModalViewControllerAnimated:YES]; + [self dismissViewControllerAnimated:YES completion:nil]; [[Statistics instance] logEvent:@"KML Export"]; } @@ -434,7 +434,7 @@ NSData * myData = [[NSData alloc] initWithContentsOfFile:filePath]; [mailVC addAttachmentData:myData mimeType:mimeType fileName:[NSString stringWithFormat:@"%@%@", catName, fileExtension]]; [mailVC setMessageBody:[NSString stringWithFormat:L(@"share_bookmarks_email_body"), catName] isHTML:NO]; - [self presentModalViewController:mailVC animated:YES]; + [self presentViewController:mailVC animated:YES completion:nil]; } - (void)calculateSections diff --git a/iphone/Maps/Bookmarks/SelectSetVC.mm b/iphone/Maps/Bookmarks/SelectSetVC.mm index d6e2d8c88d..cc44298132 100644 --- a/iphone/Maps/Bookmarks/SelectSetVC.mm +++ b/iphone/Maps/Bookmarks/SelectSetVC.mm @@ -128,7 +128,7 @@ AddSetVC * asVC = [[AddSetVC alloc] init]; asVC.delegate = self; if (IPAD) - [asVC setContentSizeForViewInPopover:[self contentSizeForViewInPopover]]; + asVC.preferredContentSize = self.preferredContentSize; [self.navigationController pushViewController:asVC animated:YES]; } else diff --git a/iphone/Maps/Categories/UIKitCategories.m b/iphone/Maps/Categories/UIKitCategories.m index 49e1585e20..8ac5a5cfe7 100644 --- a/iphone/Maps/Categories/UIKitCategories.m +++ b/iphone/Maps/Categories/UIKitCategories.m @@ -159,10 +159,7 @@ + (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay damping:(double)dampingRatio initialVelocity:(double)springVelocity options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL))completion { - if ([UIView respondsToSelector:@selector(animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)]) - [UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:springVelocity options:options animations:animations completion:completion]; - else - [UIView animateWithDuration:(duration * dampingRatio) delay:delay options:options animations:animations completion:completion]; + [UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:springVelocity options:options animations:animations completion:completion]; } - (void)sizeToIntegralFit @@ -189,16 +186,8 @@ - (CGSize)sizeWithDrawSize:(CGSize)drawSize font:(UIFont *)font { - if ([self respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) - { - CGRect rect = [self boundingRectWithSize:drawSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil]; - return CGRectIntegral(rect).size; - } - else - { - CGSize size = [self sizeWithFont:font constrainedToSize:drawSize lineBreakMode:NSLineBreakByWordWrapping]; - return CGRectIntegral(CGRectMake(0, 0, size.width, size.height)).size; - } + CGRect rect = [self boundingRectWithSize:drawSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil]; + return CGRectIntegral(rect).size; } @end diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm index c85aaf2bc9..a1bad1ea66 100644 --- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm +++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm @@ -27,14 +27,6 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController return self; } -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Need only for iOS 5. - if (isIOSVersionLessThan(6)) - self.tap.delegate = self; -} - #pragma mark - Actions - (void)presentRateAlert diff --git a/iphone/Maps/Classes/LocalNotificationManager.mm b/iphone/Maps/Classes/LocalNotificationManager.mm index 3f1b535ea3..a8c036ebc9 100644 --- a/iphone/Maps/Classes/LocalNotificationManager.mm +++ b/iphone/Maps/Classes/LocalNotificationManager.mm @@ -104,33 +104,20 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult); if ([action isEqualToString:@"Share"]) { - NSURL * link = [NSURL URLWithString:notificationInfo[@"NotificationShareLink"]]; UIImage * shareImage = [UIImage imageNamed:notificationInfo[@"NotifiicationShareImage"]]; LocalNotificationInfoProvider * infoProvider = [[LocalNotificationInfoProvider alloc] initWithDictionary:notificationInfo]; - if (isIOSVersionLessThan(6)) - { - UIPasteboard * pasteboard = [UIPasteboard generalPasteboard]; - pasteboard.URL = link; - NSString * message = [NSString stringWithFormat:L(@"copied_to_clipboard"), [link absoluteString]]; - UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:message message:nil delegate:nil cancelButtonTitle:L(@"ok") otherButtonTitles:nil]; - [alertView show]; - } - else - { - NSMutableArray * itemsToShare = [NSMutableArray arrayWithObject:infoProvider]; - if (shareImage) - [itemsToShare addObject:shareImage]; - - UIActivityViewController * activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil]; - NSMutableArray * excludedActivityTypes = [@[UIActivityTypePrint, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll] mutableCopy]; - if (!isIOSVersionLessThan(7)) - [excludedActivityTypes addObject:UIActivityTypeAirDrop]; - activityVC.excludedActivityTypes = excludedActivityTypes; - UIWindow * window = [[UIApplication sharedApplication].windows firstObject]; - NavigationController * vc = (NavigationController *)window.rootViewController; - [vc presentViewController:activityVC animated:YES completion:nil]; - } + NSMutableArray * itemsToShare = [NSMutableArray arrayWithObject:infoProvider]; + if (shareImage) + [itemsToShare addObject:shareImage]; + + UIActivityViewController * activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil]; + NSMutableArray * excludedActivityTypes = [@[UIActivityTypePrint, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll] mutableCopy]; + [excludedActivityTypes addObject:UIActivityTypeAirDrop]; + activityVC.excludedActivityTypes = excludedActivityTypes; + UIWindow * window = [[UIApplication sharedApplication].windows firstObject]; + NavigationController * vc = (NavigationController *)window.rootViewController; + [vc presentViewController:activityVC animated:YES completion:nil]; } } diff --git a/iphone/Maps/Classes/MWMTextView.mm b/iphone/Maps/Classes/MWMTextView.mm index d86767b571..944c960623 100644 --- a/iphone/Maps/Classes/MWMTextView.mm +++ b/iphone/Maps/Classes/MWMTextView.mm @@ -50,8 +50,7 @@ static CGFloat const kDefaultTextLeftInset = 5.; self.placeholderView.font = self.font; self.placeholderView.isAccessibilityElement = NO; - if (!isIOSVersionLessThan(7)) - [self setTextContainerInset:UIEdgeInsetsZero]; + [self setTextContainerInset:UIEdgeInsetsZero]; [self updatePlaceholderVisibility]; diff --git a/iphone/Maps/Classes/MapCell.mm b/iphone/Maps/Classes/MapCell.mm index 2cab626188..a717f03dc0 100644 --- a/iphone/Maps/Classes/MapCell.mm +++ b/iphone/Maps/Classes/MapCell.mm @@ -171,10 +171,6 @@ self.separatorBottom.frame = CGRectMake(0, self.contentView.height - PIXEL, self.contentView.width, PIXEL); self.separatorBottom.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleTopMargin; - - // On iOS6 and lower table view looks different, we won't show separators there. - if (isIOSVersionLessThan(7)) - self.separatorTop.alpha = self.separator.alpha = self.separatorBottom.alpha = 0.0; } - (void)prepareForReuse diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index afe98563b3..61179bc827 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -618,10 +618,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView) - (void)updateStatusBarStyle { - if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) - [self setNeedsStatusBarAppearanceUpdate]; - else - [UIApplication sharedApplication].statusBarStyle = [self preferredStatusBarStyle]; + [self setNeedsStatusBarAppearanceUpdate]; } - (id)initWithCoder:(NSCoder *)coder @@ -736,13 +733,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView) (void)Settings::Get("IsDisclaimerApproved", isDisclaimerApproved); if (!isDisclaimerApproved) { - NSString * title; - NSString * message; - if (isIOSVersionLessThan(7)) - message = L(@"routing_disclaimer"); - else - title = L(@"routing_disclaimer"); - UIAlertView * alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:L(@"cancel") otherButtonTitles:L(@"ok"), nil]; + UIAlertView * alert = [[UIAlertView alloc] initWithTitle:L(@"routing_disclaimer") message:@"" delegate:self cancelButtonTitle:L(@"cancel") otherButtonTitles:L(@"ok"), nil]; alert.tag = ALERT_VIEW_ROUTING_DISCLAIMER; [alert show]; } @@ -825,7 +816,7 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView) { if (!_apiBar) { - UIImage * image = isIOSVersionLessThan(7) ? [UIImage imageNamed:@"ApiBarBackground6"] : [UIImage imageNamed:@"ApiBarBackground7"]; + UIImage * image = [UIImage imageNamed:@"ApiBarBackground7"]; _apiBar = [[UIImageView alloc] initWithImage:[image resizableImageWithCapInsets:UIEdgeInsetsZero]]; _apiBar.width = self.view.width; _apiBar.userInteractionEnabled = YES; diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index c16a8fa766..0548d8f498 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -196,8 +196,8 @@ void InitLocalizedStrings() self.standbyCounter = 0; - if ([application respondsToSelector:@selector(setMinimumBackgroundFetchInterval:)]) - [application setMinimumBackgroundFetchInterval:(6 * 60 * 60)]; + NSTimeInterval const minimumBackgroundFetchIntervalInSeconds = 6 * 60 * 60; + [application setMinimumBackgroundFetchInterval:minimumBackgroundFetchIntervalInSeconds]; [self registerNotifications:application launchOptions:launchOptions]; @@ -221,9 +221,6 @@ void InitLocalizedStrings() application.applicationIconBadgeNumber = f.GetCountryTree().GetActiveMapLayout().GetOutOfDateCount(); f.GetLocationState()->InvalidatePosition(); - if (isIOSVersionLessThan(7)) - return [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey] != nil; - return [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; } @@ -313,9 +310,7 @@ void InitLocalizedStrings() m_mwmURL = nil; m_fileURL = nil; - if (!isIOSVersionLessThan(7)) - [FBSDKAppEvents activateApp]; - + [FBSDKAppEvents activateApp]; [self restoreRouteState]; } @@ -356,27 +351,17 @@ void InitLocalizedStrings() - (void)customizeAppearance { NSMutableDictionary * attributes = [[NSMutableDictionary alloc] init]; - attributes[UITextAttributeTextColor] = [UIColor whiteColor]; - attributes[UITextAttributeTextShadowColor] = [UIColor clearColor]; + attributes[NSForegroundColorAttributeName] = [UIColor whiteColor]; Class const navigationControllerClass = [NavigationController class]; - if (!isIOSVersionLessThan(7)) - { - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setTintColor:[UIColor whiteColor]]; - [[UIBarButtonItem appearance] setTitleTextAttributes:attributes forState:UIControlStateNormal]; - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setBarTintColor:[UIColor colorWithColorCode:@"0e8639"]]; - attributes[UITextAttributeFont] = [UIFont fontWithName:@"HelveticaNeue" size:17.5]; - } - else - { - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setTintColor:[UIColor colorWithColorCode:@"15c584"]]; - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackground7"] forBarMetrics:UIBarMetricsCompactPrompt]; - } + [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setTintColor:[UIColor whiteColor]]; + [[UIBarButtonItem appearance] setTitleTextAttributes:attributes forState:UIControlStateNormal]; + [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setBarTintColor:[UIColor colorWithColorCode:@"0e8639"]]; + attributes[NSFontAttributeName] = [UIFont fontWithName:@"HelveticaNeue" size:17.5]; - if ([UINavigationBar instancesRespondToSelector:@selector(setShadowImage:)]) - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setShadowImage:[[UIImage alloc] init]]; - - [[UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil] setTitleTextAttributes:attributes]; + UINavigationBar * navBar = [UINavigationBar appearanceWhenContainedIn:navigationControllerClass, nil]; + navBar.shadowImage = [[UIImage alloc] init]; + navBar.titleTextAttributes = attributes; } - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification @@ -392,9 +377,6 @@ void InitLocalizedStrings() if ([self checkLaunchURL:url]) return YES; - if (isIOSVersionLessThan(7)) - return NO; - return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; } @@ -587,7 +569,7 @@ void InitLocalizedStrings() - (void)showFacebookAlert { - if (isIOSVersionLessThan(7) || !Reachability.reachabilityForInternetConnection.isReachable) + if (!Reachability.reachabilityForInternetConnection.isReachable) return; UIViewController *topViewController = [(UINavigationController*)m_window.rootViewController visibleViewController]; diff --git a/iphone/Maps/Classes/RouteView.mm b/iphone/Maps/Classes/RouteView.mm index dfc16ddc3c..2673aec07c 100644 --- a/iphone/Maps/Classes/RouteView.mm +++ b/iphone/Maps/Classes/RouteView.mm @@ -124,7 +124,7 @@ extern NSString * const kAlohalyticsTapEventKey; - (void)didMoveToSuperview { - self.minY = [self viewMinY]; + self.minY = 0.0; [self setState:RouteViewStateHidden animated:NO]; } @@ -189,11 +189,6 @@ extern NSString * const kAlohalyticsTapEventKey; } completion:nil]; } -- (CGFloat)viewMinY -{ - return isIOSVersionLessThan(7) ? -20 : 0; -} - - (UIView *)phoneIdiomView { if (!_phoneIdiomView) @@ -210,7 +205,7 @@ extern NSString * const kAlohalyticsTapEventKey; if (!_phoneTurnInstructions) { _phoneTurnInstructions = [[UIView alloc] initWithFrame:CGRectZero]; - _phoneTurnInstructions.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.94];; + _phoneTurnInstructions.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.94]; _phoneTurnInstructions.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; UIImageView * shadow = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _phoneTurnInstructions.width, 18)]; @@ -272,7 +267,7 @@ extern NSString * const kAlohalyticsTapEventKey; if (!_routeInfo) { _routeInfo = [[UIView alloc] initWithFrame:CGRectZero]; - _routeInfo.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.94];; + _routeInfo.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.94]; _routeInfo.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; UIImageView * shadow = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _routeInfo.width, 18)]; diff --git a/iphone/Maps/Classes/SearchBar.mm b/iphone/Maps/Classes/SearchBar.mm index 4ee3479068..18c6b5498b 100644 --- a/iphone/Maps/Classes/SearchBar.mm +++ b/iphone/Maps/Classes/SearchBar.mm @@ -45,8 +45,7 @@ extern NSString * const kAlohalyticsTapEventKey; self.textField.midY = self.height / 2 - 3; self.textField.minX = 36.; - if ([self.textField respondsToSelector:@selector(setTintColor:)]) - self.textField.tintColor = [UIColor blackHintText]; + self.textField.tintColor = [UIColor blackHintText]; return self; } diff --git a/iphone/Maps/Classes/SearchResultCell.m b/iphone/Maps/Classes/SearchResultCell.m index 1867b26f76..d15f095c2b 100644 --- a/iphone/Maps/Classes/SearchResultCell.m +++ b/iphone/Maps/Classes/SearchResultCell.m @@ -37,25 +37,16 @@ static CGFloat const kOffset = 16.; - (void)setTitle:(NSString *)title selectedRanges:(NSArray *)selectedRanges { - if ([self.titleLabel respondsToSelector:@selector(setAttributedText:)]) - { - // iOS 6 and higher - - if (!title) - title = @""; + if (!title) + title = @""; - NSMutableAttributedString * attributedTitle = [[NSMutableAttributedString alloc] initWithString:title]; - [attributedTitle addAttributes:[self unselectedTitleAttributes] range:NSMakeRange(0, [title length])]; - for (NSValue * range in selectedRanges) - [attributedTitle addAttributes:[self selectedTitleAttributes] range:[range rangeValue]]; + NSMutableAttributedString * attributedTitle = [[NSMutableAttributedString alloc] initWithString:title]; + [attributedTitle addAttributes:[self unselectedTitleAttributes] range:NSMakeRange(0, [title length])]; + NSDictionary * selectedTitleAttributes = [self selectedTitleAttributes]; + for (NSValue * range in selectedRanges) + [attributedTitle addAttributes:selectedTitleAttributes range:[range rangeValue]]; - self.titleLabel.attributedText = attributedTitle; - } - else - { - // iOS 5 - self.titleLabel.text = title; - } + self.titleLabel.attributedText = attributedTitle; } - (NSDictionary *)selectedTitleAttributes @@ -164,11 +155,8 @@ static CGFloat const kOffset = 16.; _titleLabel.backgroundColor = [UIColor clearColor]; _titleLabel.numberOfLines = 0; _titleLabel.lineBreakMode = NSLineBreakByWordWrapping; - if (![_titleLabel respondsToSelector:@selector(setAttributedText:)]) - { - _titleLabel.font = TITLE_FONT; - _titleLabel.textColor = [UIColor blackPrimaryText]; - } + _titleLabel.font = TITLE_FONT; + _titleLabel.textColor = [UIColor blackPrimaryText]; } return _titleLabel; } diff --git a/iphone/Maps/Classes/SearchView.mm b/iphone/Maps/Classes/SearchView.mm index b19240c3e7..f6b3de98b2 100644 --- a/iphone/Maps/Classes/SearchView.mm +++ b/iphone/Maps/Classes/SearchView.mm @@ -28,16 +28,6 @@ #include "../../geometry/angles.hpp" #include "../../geometry/distance_on_sphere.hpp" - -static NSString * GetKeyboardInputLanguage() -{ - UITextInputMode * mode = [UITextInputMode currentInputMode]; - if (mode) - return mode.primaryLanguage; - // Use system language as a fall-back - return [[NSLocale preferredLanguages] firstObject]; -} - @interface SearchResultsWrapper : NSObject - (id)initWithResults:(search::Results const &)res; @@ -144,14 +134,10 @@ typedef NS_ENUM(NSUInteger, CellType) [self setState:SearchViewStateHidden animated:NO]; - if ([self.tableView respondsToSelector:@selector(registerClass:forCellReuseIdentifier:)]) - { - // only for iOS 6 and higher - [self.tableView registerClass:[SearchCategoryCell class] forCellReuseIdentifier:[SearchCategoryCell className]]; - [self.tableView registerClass:[SearchResultCell class] forCellReuseIdentifier:[SearchResultCell className]]; - [self.tableView registerClass:[SearchSuggestCell class] forCellReuseIdentifier:[SearchSuggestCell className]]; - [self.tableView registerClass:[SearchShowOnMapCell class] forCellReuseIdentifier:[SearchShowOnMapCell className]]; - } + [self.tableView registerClass:[SearchCategoryCell class] forCellReuseIdentifier:[SearchCategoryCell className]]; + [self.tableView registerClass:[SearchResultCell class] forCellReuseIdentifier:[SearchResultCell className]]; + [self.tableView registerClass:[SearchSuggestCell class] forCellReuseIdentifier:[SearchSuggestCell className]]; + [self.tableView registerClass:[SearchShowOnMapCell class] forCellReuseIdentifier:[SearchShowOnMapCell className]]; [self layoutSubviews]; self.tableView.contentOffset = CGPointMake(0, -self.topBackgroundView.height); @@ -313,7 +299,7 @@ static BOOL keyboardLoaded = NO; [self frameworkDidAddSearchResult:wrapper]; }); }; - sp.SetInputLocale([GetKeyboardInputLanguage() UTF8String]); + sp.SetInputLocale([[self keyboardInputLanguage] UTF8String]); sp.SetForceSearch(force == YES); } @@ -479,7 +465,7 @@ static BOOL keyboardLoaded = NO; search::SearchParams params; params.m_query = [[self.searchBar.textField.text precomposedStringWithCompatibilityMapping] UTF8String]; - params.SetInputLocale([GetKeyboardInputLanguage() UTF8String]); + params.SetInputLocale([[self keyboardInputLanguage] UTF8String]); f.StartInteractiveSearch(params); @@ -504,12 +490,12 @@ static BOOL keyboardLoaded = NO; - (CGFloat)defaultSearchBarMinY { - return isIOSVersionLessThan(7) ? 3 : 20; + return 20.0; } - (CGFloat)defaultTopBackgroundHeight { - return isIOSVersionLessThan(7) ? 44 : 64; + return 64.0; } - (BOOL)iPhoneInLandscape @@ -804,6 +790,15 @@ static BOOL keyboardLoaded = NO; [[NSNotificationCenter defaultCenter] removeObserver:self]; } +- (NSString *)keyboardInputLanguage +{ + UITextInputMode * mode = [self textInputMode]; + if (mode) + return mode.primaryLanguage; + // Use system language as a fall-back + return [[NSLocale preferredLanguages] firstObject]; +} + #pragma mark - Properties - (CGRect)infoRect diff --git a/iphone/Maps/Classes/ShareActionSheet.mm b/iphone/Maps/Classes/ShareActionSheet.mm index b91a475409..44d310be4b 100644 --- a/iphone/Maps/Classes/ShareActionSheet.mm +++ b/iphone/Maps/Classes/ShareActionSheet.mm @@ -104,7 +104,7 @@ [mailVC setMessageBody:body isHTML:NO]; [mailVC setSubject:subject]; mailVC.mailComposeDelegate = self; - [self.viewController presentModalViewController:mailVC animated:YES]; + [self.viewController presentViewController:mailVC animated:YES completion:nil]; } else if ([self canUseGmailApp]) { @@ -124,19 +124,19 @@ else [messageVC setBody:[NSString stringWithFormat:L(@"bookmark_share_sms"), shortUrl, httpGe0Url]]; messageVC.messageComposeDelegate = self; - [self.viewController presentModalViewController:messageVC animated:YES]; + [self.viewController presentViewController:messageVC animated:YES completion:nil]; } - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { - [self.viewController dismissModalViewControllerAnimated:YES]; + [self.viewController dismissViewControllerAnimated:YES completion:nil]; if (result == MessageComposeResultSent) [[Statistics instance] logEvent:@"ge0(zero) MESSAGE Export"]; } - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { - [self.viewController dismissModalViewControllerAnimated:YES]; + [self.viewController dismissViewControllerAnimated:YES completion:nil]; if (result == MFMailComposeResultSent || result == MFMailComposeResultSaved) [[Statistics instance] logEvent:@"ge0(zero) MAIL Export"]; } diff --git a/iphone/Maps/Classes/TwoButtonsView.m b/iphone/Maps/Classes/TwoButtonsView.m index 4b3cd67324..6859e52399 100644 --- a/iphone/Maps/Classes/TwoButtonsView.m +++ b/iphone/Maps/Classes/TwoButtonsView.m @@ -19,14 +19,14 @@ self.leftButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [self.leftButton addTarget:target action:leftSel forControlEvents:UIControlEventTouchUpInside]; [self.leftButton setTitle:leftTitle forState:UIControlStateNormal]; - self.leftButton.titleLabel.lineBreakMode = UILineBreakModeWordWrap; - self.leftButton.titleLabel.textAlignment = UITextAlignmentCenter; + self.leftButton.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; + self.leftButton.titleLabel.textAlignment = NSTextAlignmentCenter; self.rightButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [self.rightButton addTarget:target action:rightSel forControlEvents:UIControlEventTouchUpInside]; [self.rightButton setTitle:rightTitle forState:UIControlStateNormal]; - self.rightButton.titleLabel.lineBreakMode = UILineBreakModeWordWrap; - self.rightButton.titleLabel.textAlignment = UITextAlignmentCenter; + self.rightButton.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; + self.rightButton.titleLabel.textAlignment = NSTextAlignmentCenter; [self addSubview:self.leftButton]; [self addSubview:self.rightButton]; diff --git a/iphone/Maps/Classes/WatchEventHandler/MWMWatchNotification.mm b/iphone/Maps/Classes/WatchEventHandler/MWMWatchNotification.mm index 49fddf5304..f536d0f4f2 100644 --- a/iphone/Maps/Classes/WatchEventHandler/MWMWatchNotification.mm +++ b/iphone/Maps/Classes/WatchEventHandler/MWMWatchNotification.mm @@ -27,9 +27,6 @@ static NSString * const kMWMWatchNotificationArchiveNameFormat = @"%@.archive"; - (instancetype)init { - if (![[NSFileManager defaultManager] respondsToSelector:@selector(containerURLForSecurityApplicationGroupIdentifier:)]) - return nil; - self = [super init]; if (self) { diff --git a/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/ApiBarBackground6@2x.png b/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/ApiBarBackground6@2x.png deleted file mode 100644 index 04936b8b57..0000000000 Binary files a/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/ApiBarBackground6@2x.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/Contents.json b/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/Contents.json deleted file mode 100644 index bba92e6904..0000000000 --- a/iphone/Maps/Images.xcassets/ApiBarBackground6.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "ApiBarBackground6@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/29x29.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/29x29.png deleted file mode 100644 index 53a52771f0..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/29x29.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50.png deleted file mode 100644 index ebcdcb88c4..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50@2x.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50@2x.png deleted file mode 100644 index ff16ec0b80..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/50x50@2x.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57.png deleted file mode 100644 index 7c9995564f..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57@2x.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57@2x.png deleted file mode 100644 index 7a514da210..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/57x57@2x.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72.png deleted file mode 100644 index d78dffcd54..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72@2x.png b/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72@2x.png deleted file mode 100644 index 29b9c5a536..0000000000 Binary files a/iphone/Maps/Images.xcassets/AppIcon.appiconset/72x72@2x.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/AppIcon.appiconset/Contents.json b/iphone/Maps/Images.xcassets/AppIcon.appiconset/Contents.json index 3f27b3531a..c01af0501a 100644 --- a/iphone/Maps/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/iphone/Maps/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,11 +1,5 @@ { "images" : [ - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "29x29.png", - "scale" : "1x" - }, { "size" : "29x29", "idiom" : "iphone", @@ -30,18 +24,6 @@ "filename" : "40x40@3x.png", "scale" : "3x" }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "57x57.png", - "scale" : "1x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "57x57@2x.png", - "scale" : "2x" - }, { "size" : "60x60", "idiom" : "iphone", @@ -78,30 +60,6 @@ "filename" : "40x40@2x-1.png", "scale" : "2x" }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "50x50.png", - "scale" : "1x" - }, - { - "size" : "50x50", - "idiom" : "ipad", - "filename" : "50x50@2x.png", - "scale" : "2x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "72x72.png", - "scale" : "1x" - }, - { - "size" : "72x72", - "idiom" : "ipad", - "filename" : "72x72@2x.png", - "scale" : "2x" - }, { "size" : "76x76", "idiom" : "ipad", diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 1a45d17142..f7d000b26e 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -9,7 +9,7 @@ /* Begin PBXBuildFile section */ 1D3623260D0F684500981E51 /* MapsAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* MapsAppDelegate.mm */; }; 1D60589B0D05DD56006BFB54 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 288765080DF74369002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765070DF74369002DB57D /* CoreGraphics.framework */; }; 28AD73880D9D96C1002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD73870D9D96C1002E5188 /* MainWindow.xib */; }; @@ -17,14 +17,14 @@ 343F262E1AEFC4A300388A6D /* MWMFrameworkUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 343F262D1AEFC4A300388A6D /* MWMFrameworkUtils.mm */; }; 343F26301AEFDB1A00388A6D /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 343F262F1AEFDB1A00388A6D /* Framework.cpp */; }; 343F26311AEFDF3E00388A6D /* resources-xhdpi in Resources */ = {isa = PBXBuildFile; fileRef = 97FC99DA19C1A2CD00C1CF98 /* resources-xhdpi */; }; - 34570A361B13217C00E6D4FD /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A331B13217C00E6D4FD /* Bolts.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A371B13217C00E6D4FD /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A341B13217C00E6D4FD /* Parse.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A381B13217C00E6D4FD /* ParseFacebookUtilsV4.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A351B13217C00E6D4FD /* ParseFacebookUtilsV4.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A391B13219600E6D4FD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C98653186C5F0500AF7E9E /* AudioToolbox.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A3B1B13222600E6D4FD /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3A1B13222600E6D4FD /* libz.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A3D1B13223000E6D4FD /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3C1B13223000E6D4FD /* libsqlite3.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A3F1B13225500E6D4FD /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3E1B13225500E6D4FD /* Accounts.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 34570A411B13229300E6D4FD /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A401B13229300E6D4FD /* FBSDKLoginKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 34570A361B13217C00E6D4FD /* Bolts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A331B13217C00E6D4FD /* Bolts.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A371B13217C00E6D4FD /* Parse.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A341B13217C00E6D4FD /* Parse.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A381B13217C00E6D4FD /* ParseFacebookUtilsV4.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A351B13217C00E6D4FD /* ParseFacebookUtilsV4.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A391B13219600E6D4FD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C98653186C5F0500AF7E9E /* AudioToolbox.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A3B1B13222600E6D4FD /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3A1B13222600E6D4FD /* libz.dylib */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A3D1B13223000E6D4FD /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3C1B13223000E6D4FD /* libsqlite3.dylib */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A3F1B13225500E6D4FD /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3E1B13225500E6D4FD /* Accounts.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 34570A411B13229300E6D4FD /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A401B13229300E6D4FD /* FBSDKLoginKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 345C31711AE798DD00EA0CC2 /* MWMCategoriesInterfaceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 345C316E1AE798DD00EA0CC2 /* MWMCategoriesInterfaceCell.m */; }; 345C31721AE798DD00EA0CC2 /* MWMCategoriesInterfaceController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345C31701AE798DD00EA0CC2 /* MWMCategoriesInterfaceController.mm */; }; 345C31781AE799B600EA0CC2 /* MWMSearchResultCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 345C31751AE799B600EA0CC2 /* MWMSearchResultCell.m */; }; @@ -133,10 +133,10 @@ 97CC93BB19599F4700369B42 /* SearchSuggestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 97CC93BA19599F4700369B42 /* SearchSuggestCell.m */; }; 97D40C0A184D031900A1D572 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97D40C09184D031900A1D572 /* Images.xcassets */; }; 97D807BE18A93C8800D416E0 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C98651186C5EF000AF7E9E /* iAd.framework */; }; - 97ECD871183620CE00F77A46 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD870183620CE00F77A46 /* AdSupport.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 97ECD871183620CE00F77A46 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD870183620CE00F77A46 /* AdSupport.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 97ECD87818362B3D00F77A46 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87718362B3D00F77A46 /* CoreTelephony.framework */; }; 97ECD87A18362B5400F77A46 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87918362B5400F77A46 /* MobileCoreServices.framework */; }; - 97ECD87F1836594400F77A46 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87E1836594400F77A46 /* StoreKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 97ECD87F1836594400F77A46 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87E1836594400F77A46 /* StoreKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 97F0817E19AF72590098FB0B /* BadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F0817D19AF72590098FB0B /* BadgeView.m */; }; 97F61781183E6172009919E2 /* LocationButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F6177F183E6172009919E2 /* LocationButton.mm */; }; 97F61794183E7445009919E2 /* LinkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.m */; }; @@ -151,8 +151,8 @@ B00511041A1101F600A61AA4 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B00511031A1101F600A61AA4 /* CoreData.framework */; }; B00511061A1101FC00A61AA4 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B00511051A1101FC00A61AA4 /* CoreMedia.framework */; }; B08AA8CE1A24C7BC00810B1C /* LocalNotificationInfoProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = B08AA8CD1A24C7BC00810B1C /* LocalNotificationInfoProvider.m */; }; - B08AA8D51A25E58500810B1C /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864F186C5EDE00AF7E9E /* PassKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - B08AA8D61A25E58C00810B1C /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864D186C5ED300AF7E9E /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + B08AA8D51A25E58500810B1C /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864F186C5EDE00AF7E9E /* PassKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + B08AA8D61A25E58C00810B1C /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864D186C5ED300AF7E9E /* Social.framework */; settings = {ATTRIBUTES = (Required, ); }; }; B08AA8DA1A26299A00810B1C /* TimeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = B08AA8D91A26299A00810B1C /* TimeUtils.m */; }; B0DFE6311A1B78A200B6C35E /* LocalNotifications.plist in Resources */ = {isa = PBXBuildFile; fileRef = B0DFE62F1A1B78A200B6C35E /* LocalNotifications.plist */; }; B0E1FCDC1A23399E00A8E08B /* RouteOverallInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = B0E1FCDB1A23399E00A8E08B /* RouteOverallInfoView.m */; }; @@ -211,8 +211,8 @@ F69A16A31AF24A3300EF43F0 /* libMyTracker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F69A16A21AF24A3300EF43F0 /* libMyTracker.a */; }; F6BACD021AD946C3004E99B1 /* World.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FAFF42291347F101009BBB14 /* World.mwm */; }; F6BACD031AD946C3004E99B1 /* WorldCoasts.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FA459EB314327AF700B5BB3C /* WorldCoasts.mwm */; }; - F6BC1E4D1ACBE96100EF0360 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6BC1E4B1ACBE96100EF0360 /* FBSDKCoreKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - F6BC1E4E1ACBE96100EF0360 /* FBSDKShareKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6BC1E4C1ACBE96100EF0360 /* FBSDKShareKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + F6BC1E4D1ACBE96100EF0360 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6BC1E4B1ACBE96100EF0360 /* FBSDKCoreKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + F6BC1E4E1ACBE96100EF0360 /* FBSDKShareKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6BC1E4C1ACBE96100EF0360 /* FBSDKShareKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; F6BC1E521ACBF98600EF0360 /* MWMFacebookAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BC1E511ACBF98600EF0360 /* MWMFacebookAlert.mm */; }; F6BC1E541ACBF9AB00EF0360 /* MWMFacebookAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6BC1E531ACBF9AB00EF0360 /* MWMFacebookAlert.xib */; }; F6C6FE201AD6BEA0009FDED7 /* MWMWatchLocationTracker.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6C6FE1F1AD6BEA0009FDED7 /* MWMWatchLocationTracker.mm */; }; @@ -2337,7 +2337,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-release-drape-$(CURRENT_ARCH)/out/release\"", "$(PROJECT_DIR)/MyTracker", @@ -2448,7 +2448,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-debug-drape-$(CURRENT_ARCH)/out/debug\"", "$(PROJECT_DIR)/MyTracker", @@ -2960,7 +2960,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-debug-i386/out/debug\"", "$(PROJECT_DIR)/MyTracker", @@ -3067,7 +3067,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-debug-$(CURRENT_ARCH)/out/debug\"", "$(PROJECT_DIR)/MyTracker", @@ -3179,7 +3179,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-production-$(CURRENT_ARCH)/out/production\"", "$(PROJECT_DIR)/MyTracker", @@ -3291,7 +3291,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-production-$(CURRENT_ARCH)/out/production\"", "$(PROJECT_DIR)/MyTracker", @@ -3401,7 +3401,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-release-$(CURRENT_ARCH)/out/release\"", "$(PROJECT_DIR)/MyTracker", @@ -3510,7 +3510,7 @@ ../../3party/boost, ../../, ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ( "\"$(SRCROOT)/../../../omim-iphone-release-i386/out/release\"", "$(PROJECT_DIR)/MyTracker", diff --git a/iphone/Maps/Platform/LocationManager.mm b/iphone/Maps/Platform/LocationManager.mm index 4fed1dacdf..73db8b3330 100644 --- a/iphone/Maps/Platform/LocationManager.mm +++ b/iphone/Maps/Platform/LocationManager.mm @@ -20,7 +20,6 @@ static NSString * const kAlohalyticsLocationRequestAlwaysFailed = @"$locationAlw { m_locationManager = [[CLLocationManager alloc] init]; m_locationManager.delegate = self; - m_locationManager.purpose = L(@"location_services_are_needed_desc"); [UIDevice currentDevice].batteryMonitoringEnabled = YES; [self refreshAccuracy]; m_locationManager.headingFilter = 3.0; diff --git a/tools/mkspecs/iphonedevice-clang/qmake.conf b/tools/mkspecs/iphonedevice-clang/qmake.conf index e3ab2a4cbe..a7a4567cba 100644 --- a/tools/mkspecs/iphonedevice-clang/qmake.conf +++ b/tools/mkspecs/iphonedevice-clang/qmake.conf @@ -61,7 +61,7 @@ QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a QMAKE_COMPILER_DEFINES += __GNUC__ -DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=50100 +DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=70000 #QMAKE_CFLAGS += -isysroot $$IPHONE_SDK_PATH #QMAKE_CFLAGS += -I$$IPHONE_SDK_PATH/usr/include QMAKE_CFLAGS += --sysroot=$$IPHONE_SDK_PATH @@ -69,7 +69,7 @@ QMAKE_CFLAGS += -isystem $$IPHONE_SDK_PATH/usr/include QMAKE_CFLAGS += -iwithsysroot $$IPHONE_SDK_PATH #QMAKE_CFLAGS += -iwithsysroot $$IPHONE_SDK_PATH/System/Library/Frameworks/ QMAKE_CFLAGS += -fmessage-length=0 -QMAKE_CFLAGS += -pipe -miphoneos-version-min=5.1 -Wno-deprecated-register +QMAKE_CFLAGS += -pipe -miphoneos-version-min=7.0 -Wno-deprecated-register QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w @@ -110,7 +110,7 @@ QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC -QMAKE_LFLAGS += -stdlib=libc++ -miphoneos-version-min=5.1 -headerpad_max_install_names -Xlinker "-syslibroot $$IPHONE_SDK_PATH" +QMAKE_LFLAGS += -stdlib=libc++ -miphoneos-version-min=7.0 -headerpad_max_install_names -Xlinker "-syslibroot $$IPHONE_SDK_PATH" QMAKE_LFLAGS_RELEASE += -O3 QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += diff --git a/tools/mkspecs/iphonesimulator-clang/qmake.conf b/tools/mkspecs/iphonesimulator-clang/qmake.conf index 8a24d0d358..eb89a767f5 100644 --- a/tools/mkspecs/iphonesimulator-clang/qmake.conf +++ b/tools/mkspecs/iphonesimulator-clang/qmake.conf @@ -59,9 +59,9 @@ QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a QMAKE_COMPILER_DEFINES += -DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=50100 +DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=70000 QMAKE_CFLAGS += --sysroot=$$IPHONE_SDK_PATH -fmessage-length=0 -fpascal-strings -fasm-blocks -QMAKE_CFLAGS += -pipe -arch i386 -mios-simulator-version-min=5.1 -Wno-deprecated-register +QMAKE_CFLAGS += -pipe -arch i386 -mios-simulator-version-min=7.0 -Wno-deprecated-register QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w @@ -102,7 +102,7 @@ QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC -QMAKE_LFLAGS += -headerpad_max_install_names -stdlib=libc++ -mios-simulator-version-min=5.1 +QMAKE_LFLAGS += -headerpad_max_install_names -stdlib=libc++ -mios-simulator-version-min=7.0 QMAKE_LFLAGS_RELEASE += QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP +=