diff options
author | Sergey Yershov <syershov@maps.me> | 2017-01-12 18:00:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-12 18:00:48 +0300 |
commit | d76fdc2e3c6d9a4d8007cc0dea1c43e8092a22c3 (patch) | |
tree | 59696dcdfdc98505e5dcc8bafca08cffa004ca26 | |
parent | 2073caed621f0cef80cc1cf65de3caef44b7fdcd (diff) | |
parent | 5ee6ddc97e1268443280fb7d686e881a8c6cad25 (diff) |
Merge pull request #5172 from igrechuhin/MAPSME-2514beta-568
[MAPSME-2514] [ios] Updated Welcome/What’s New screens.
56 files changed, 762 insertions, 855 deletions
diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 5f288375e8..b1da704ee4 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -1,10 +1,11 @@ #import "BookmarksVC.h" #import "CircleView.h" #import "ColorPickerView.h" -#import "MWMCommon.h" #import "MWMBookmarkNameCell.h" +#import "MWMCommon.h" #import "MWMLocationHelpers.h" #import "MWMLocationManager.h" +#import "MWMLocationObserver.h" #import "MWMMailViewController.h" #import "MWMMapViewControlsManager.h" #import "MapViewController.h" diff --git a/iphone/Maps/Bridging-Header.h b/iphone/Maps/Bridging-Header.h index 0b1139adae..a8ec39e209 100644 --- a/iphone/Maps/Bridging-Header.h +++ b/iphone/Maps/Bridging-Header.h @@ -4,11 +4,20 @@ #import <UIKit/UIKit.h> +#import "3party/Alohalytics/src/alohalytics_objc.h" + +#import "AppInfo.h" +#import "MWMFrameworkHelper.h" #import "MWMKeyboard.h" +#import "MWMLocationManager.h" #import "MWMNoMapsViewController.h" +#import "MWMPushNotifications.h" #import "MWMSearchNoResults.h" #import "MWMTableViewCell.h" +#import "MWMTypes.h" #import "MWMViewController.h" +#import "Statistics.h" #import "UIColor+MapsMeColor.h" #import "UIFont+MapsMeFonts.h" +#import "UIKitCategories.h" #import "UIViewController+Navigation.h" diff --git a/iphone/Maps/Categories/DateComponentsFormatter+ETA.swift b/iphone/Maps/Categories/DateComponentsFormatter+ETA.swift index 6d9cddb921..010a7f8f6d 100644 --- a/iphone/Maps/Categories/DateComponentsFormatter+ETA.swift +++ b/iphone/Maps/Categories/DateComponentsFormatter+ETA.swift @@ -8,5 +8,4 @@ extension DateComponentsFormatter { formatter.zeroFormattingBehavior = .dropAll return formatter.string(from: ti) } - } diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm index 4627c28104..a1b8e4f650 100644 --- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm +++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm @@ -51,7 +51,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController - (void)presentRateAlert { [self displayAlert:MWMAlert.rateAlert]; } - (void)presentLocationAlert { - if (![MapViewController controller].pageViewController) + if (![MapViewController controller].welcomePageController) [self displayAlert:[MWMAlert locationAlert]]; } - (void)presentPoint2PointAlertWithOkBlock:(nonnull TMWMVoidBlock)okBlock diff --git a/iphone/Maps/Classes/CustomAlert/LocationNotFoundAlert/MWMLocationNotFoundAlert.mm b/iphone/Maps/Classes/CustomAlert/LocationNotFoundAlert/MWMLocationNotFoundAlert.mm index c6e192ff6e..4ff8b8eaf5 100644 --- a/iphone/Maps/Classes/CustomAlert/LocationNotFoundAlert/MWMLocationNotFoundAlert.mm +++ b/iphone/Maps/Classes/CustomAlert/LocationNotFoundAlert/MWMLocationNotFoundAlert.mm @@ -1,6 +1,7 @@ #import "MWMLocationNotFoundAlert.h" #import "MWMDefaultAlert_Protected.h" #import "MWMLocationManager.h" +#import "MWMLocationObserver.h" @interface MWMLocationNotFoundAlert ()<MWMLocationObserver> diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.h deleted file mode 100644 index 8ca2e0b53a..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMWelcomeController.h" - -@interface MWMFirstLaunchController : MWMWelcomeController - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.mm deleted file mode 100644 index 356dfb9c72..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMFirstLaunchController.mm +++ /dev/null @@ -1,126 +0,0 @@ -#import "MWMFirstLaunchController.h" -#import "MWMLocationManager.h" -#import "MWMPageController.h" -#import "MapViewController.h" -#import "MapsAppDelegate.h" - -#include "Framework.h" - -@interface MWMLocationManager () - -@property(nonatomic) BOOL started; -+ (MWMLocationManager *)manager; - -@end - -@interface MWMFirstLaunchController () - -@property(weak, nonatomic) IBOutlet UIView * containerView; -@property(weak, nonatomic) IBOutlet UIImageView * image; -@property(weak, nonatomic) IBOutlet UILabel * alertTitle; -@property(weak, nonatomic) IBOutlet UILabel * alertText; -@property(weak, nonatomic) IBOutlet UIButton * nextPageButton; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerWidth; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerHeight; - -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageMinHeight; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageHeight; - -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleTopOffset; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleImageOffset; - -@end - -namespace -{ -void requestNotifications() { [MapsAppDelegate initPushNotificationsWithLaunchOptions:nil]; } -void zoomToCurrentPosition() -{ - auto & f = GetFramework(); - CLLocation * lastLocation = [MWMLocationManager lastLocation]; - if (!lastLocation) - f.SwitchMyPositionNextMode(); - else - f.SetViewportCenter(lastLocation.mercator, 13 /* zoom */); -} - -NSInteger constexpr kRequestLocationPage = 2; -NSInteger constexpr kRequestNotificationsPage = 3; - -NSArray<TMWMWelcomeConfigBlock> * pagesConfigBlocks = @[ - [^(MWMFirstLaunchController * controller) { - controller.image.image = [UIImage imageNamed:@"img_onboarding_offline_maps"]; - controller.alertTitle.text = L(@"onboarding_offline_maps_title"); - controller.alertText.text = L(@"onboarding_offline_maps_message"); - [controller.nextPageButton setTitle:L(@"whats_new_next_button") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(nextPage) - forControlEvents:UIControlEventTouchUpInside]; - } copy], - [^(MWMFirstLaunchController * controller) { - controller.image.image = [UIImage imageNamed:@"img_onboarding_geoposition"]; - controller.alertTitle.text = L(@"onboarding_location_title"); - controller.alertText.text = L(@"onboarding_location_message"); - [controller.nextPageButton setTitle:L(@"whats_new_next_button") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(nextPage) - forControlEvents:UIControlEventTouchUpInside]; - } copy], - [^(MWMFirstLaunchController * controller) { - controller.image.image = [UIImage imageNamed:@"img_onboarding_notification"]; - controller.alertTitle.text = L(@"onboarding_notifications_title"); - controller.alertText.text = L(@"onboarding_notifications_message"); - [controller.nextPageButton setTitle:L(@"whats_new_next_button") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(nextPage) - forControlEvents:UIControlEventTouchUpInside]; - } copy], - [^(MWMFirstLaunchController * controller) { - controller.image.image = [UIImage imageNamed:@"img_onboarding_done"]; - controller.alertTitle.text = L(@"first_launch_congrats_title"); - controller.alertText.text = L(@"first_launch_congrats_text"); - [controller.nextPageButton setTitle:L(@"done") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller - action:@selector(close) - forControlEvents:UIControlEventTouchUpInside]; - } copy] -]; -} // namespace - -@implementation MWMFirstLaunchController - -+ (NSString *)udWelcomeWasShownKey { return @"FirstLaunchWelcomeWasShown"; } -+ (NSArray<TMWMWelcomeConfigBlock> *)pagesConfig { return pagesConfigBlocks; } -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - if (self.pageIndex == kRequestLocationPage) - [self requestLocation]; - else if (self.pageIndex == kRequestNotificationsPage) - requestNotifications(); -} - -- (void)requestLocation { [MWMLocationManager manager].started = YES; } -- (void)close -{ - [self.pageController close]; - zoomToCurrentPosition(); -} - -#pragma mark - Properties - -- (void)setSize:(CGSize)size -{ - super.size = size; - CGSize const newSize = super.size; - CGFloat const width = newSize.width; - CGFloat const height = newSize.height; - BOOL const hideImage = (self.imageHeight.multiplier * height <= self.imageMinHeight.constant); - self.titleImageOffset.priority = - hideImage ? UILayoutPriorityDefaultLow : UILayoutPriorityDefaultHigh; - self.image.hidden = hideImage; - self.containerWidth.constant = width; - self.containerHeight.constant = height; -} - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.h deleted file mode 100644 index 77b0a20463..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.h +++ /dev/null @@ -1,23 +0,0 @@ -#import "MWMViewController.h" - -@class MWMPageController; - -@protocol MWMWelcomeControllerProtocol <NSObject> - -+ (UIStoryboard *)welcomeStoryboard; -+ (instancetype)welcomeController; -+ (NSInteger)pagesCount; -+ (NSString *)udWelcomeWasShownKey; - -@end - -@interface MWMWelcomeController : MWMViewController <MWMWelcomeControllerProtocol> - -@property (nonatomic) NSInteger pageIndex; -@property (weak, nonatomic) MWMPageController * pageController; - -@property (nonatomic) CGSize size; - -@end - -using TMWMWelcomeConfigBlock = void (^)(MWMWelcomeController * controller); diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.mm deleted file mode 100644 index 2448c84f62..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWelcomeController.mm +++ /dev/null @@ -1,72 +0,0 @@ -#import "MWMWelcomeController.h" - -@implementation MWMWelcomeController - -+ (UIStoryboard *)welcomeStoryboard -{ - return [UIStoryboard storyboardWithName:@"Welcome" bundle:[NSBundle mainBundle]]; -} - -+ (instancetype)welcomeController -{ - return [[self welcomeStoryboard] instantiateViewControllerWithIdentifier:[self className]]; -} - -+ (NSInteger)pagesCount -{ - return [self pagesConfig].count; -} - -+ (NSString *)udWelcomeWasShownKey -{ - [self doesNotRecognizeSelector:_cmd]; - return nil; -} - -+ (NSArray<TMWMWelcomeConfigBlock> *)pagesConfig -{ - [self doesNotRecognizeSelector:_cmd]; - return nil; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - [self configPage]; -} - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - self.size = self.parentViewController.view.size; -} - -- (void)configPage -{ - [[self class] pagesConfig][self.pageIndex](self); -} - -- (void)viewWillTransitionToSize:(CGSize)size - withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator -{ - [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) - { - self.size = size; - } completion:nil]; -} - -#pragma mark - Properties - -- (void)setSize:(CGSize)size -{ - CGSize const iPadSize = {520.0, 600.0}; - CGSize const newSize = IPAD ? iPadSize : size; - self.parentViewController.view.size = newSize; -} - -- (CGSize)size -{ - return self.parentViewController.view.size; -} - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.h deleted file mode 100644 index 12e5582686..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMWelcomeController.h" - -@interface MWMWhatsNewTrafficController : MWMWelcomeController - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.mm deleted file mode 100644 index 40f82a6e5a..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/MWMWhatsNewTrafficController.mm +++ /dev/null @@ -1,77 +0,0 @@ -#import "MWMWhatsNewTrafficController.h" -#import "MWMPageController.h" - -@interface MWMWhatsNewTrafficController () - -@property(weak, nonatomic) IBOutlet UIView * containerView; -@property(weak, nonatomic) IBOutlet UIImageView * image; -@property(weak, nonatomic) IBOutlet UILabel * alertTitle; -@property(weak, nonatomic) IBOutlet UILabel * alertText; -@property(weak, nonatomic) IBOutlet UIButton * nextPageButton; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerWidth; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerHeight; - -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageMinHeight; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageHeight; - -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleTopOffset; -@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleImageOffset; - -@end - -namespace -{ -NSArray<TMWMWelcomeConfigBlock> * pagesConfigBlocks = @[ - [^(MWMWhatsNewTrafficController * controller) { - controller.image.image = [UIImage imageNamed:@"whats_new_traffic"]; - controller.alertTitle.text = L(@"whatsnew_traffic"); - controller.alertText.text = L(@"whatsnew_traffic_text"); - [controller.nextPageButton setTitle:L(@"whats_new_next_button") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(nextPage) - forControlEvents:UIControlEventTouchUpInside]; - } copy], - [^(MWMWhatsNewTrafficController * controller) { - controller.image.image = [UIImage imageNamed:@"whats_new_traffic_roaming"]; - controller.alertTitle.text = L(@"whatsnew_traffic_roaming"); - controller.alertText.text = L(@"whatsnew_traffic_roaming_text"); - [controller.nextPageButton setTitle:L(@"whats_new_next_button") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(nextPage) - forControlEvents:UIControlEventTouchUpInside]; - } copy], - [^(MWMWhatsNewTrafficController * controller) { - controller.image.image = [UIImage imageNamed:@"whats_new_update_uber"]; - controller.alertTitle.text = L(@"whatsnew_order_taxi"); - controller.alertText.text = L(@"whatsnew_order_taxi_text"); - [controller.nextPageButton setTitle:L(@"done") forState:UIControlStateNormal]; - [controller.nextPageButton addTarget:controller.pageController - action:@selector(close) - forControlEvents:UIControlEventTouchUpInside]; - } copy] -]; - -} // namespace - -@implementation MWMWhatsNewTrafficController - -+ (NSString *)udWelcomeWasShownKey { return @"MWMWhatsNewTrafficController"; } -+ (NSArray<TMWMWelcomeConfigBlock> *)pagesConfig { return pagesConfigBlocks; } -- (IBAction)close { [self.pageController close]; } -#pragma mark - Properties - -- (void)setSize:(CGSize)size -{ - super.size = size; - CGSize const newSize = super.size; - CGFloat const width = newSize.width; - CGFloat const height = newSize.height; - BOOL const hideImage = (self.imageHeight.multiplier * height <= self.imageMinHeight.constant); - self.titleImageOffset.priority = - hideImage ? UILayoutPriorityDefaultLow : UILayoutPriorityDefaultHigh; - self.image.hidden = hideImage; - self.containerWidth.constant = width; - self.containerHeight.constant = height; -} - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.h deleted file mode 100644 index 4e4e04a739..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "MWMWelcomeController.h" - -@class MWMPageController; - -@protocol MWMPageControllerProtocol <NSObject> - -- (void)closePageController:(MWMPageController *)pageController; - -@end - -NS_CLASS_AVAILABLE_IOS(8_0) @interface MWMPageController : UIPageViewController - -+ (instancetype)pageControllerWithParent:(UIViewController<MWMPageControllerProtocol> *)parentViewController welcomeClass:(Class<MWMWelcomeControllerProtocol>)welcomeClass; - -- (void)close; -- (void)nextPage; -- (void)show; - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.mm deleted file mode 100644 index 9c2199a322..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.mm +++ /dev/null @@ -1,154 +0,0 @@ -#import "MWMPageController.h" -#import "MWMPageControllerDataSource.h" -#import "Statistics.h" - -@interface MWMPageController () - -@property(nonatomic) SolidTouchView * iPadBackgroundView; -@property(weak, nonatomic) UIViewController<MWMPageControllerProtocol> * parent; -@property(nonatomic) Class<MWMWelcomeControllerProtocol> welcomeClass; - -@property(nonatomic) MWMPageControllerDataSource * pageControllerDataSource; -@property(nonatomic) MWMWelcomeController * currentController; -@property(nonatomic) BOOL isAnimatingTransition; - -@end - -@implementation MWMPageController - -+ (instancetype)pageControllerWithParent: - (UIViewController<MWMPageControllerProtocol> *)parentViewController - welcomeClass:(Class<MWMWelcomeControllerProtocol>)welcomeClass -{ - NSAssert(parentViewController != nil, @"Parent view controller can't be nil!"); - MWMPageControllerDataSource * dataSource = - [[MWMPageControllerDataSource alloc] initWithWelcomeClass:welcomeClass]; - MWMPageController * pageController = nil; - if ([dataSource presentationCountForPageViewController:pageController] == 1) - pageController = [[MWMWelcomeController welcomeStoryboard] - instantiateViewControllerWithIdentifier:@"MWMPageCurlController"]; - else - pageController = [[MWMWelcomeController welcomeStoryboard] - instantiateViewControllerWithIdentifier:@"MWMPageScrollController"]; - pageController.pageControllerDataSource = dataSource; - pageController.parent = parentViewController; - pageController.welcomeClass = welcomeClass; - return pageController; -} - -- (void)close -{ - MWMWelcomeController * current = self.currentController; - [Statistics logEvent:kStatEventName(kStatWhatsNew, [[current class] udWelcomeWasShownKey]) - withParameters:@{kStatAction : kStatClose}]; - [self.iPadBackgroundView removeFromSuperview]; - [self.view removeFromSuperview]; - [self removeFromParentViewController]; - [self.parent closePageController:self]; -} - -- (void)nextPage -{ - MWMWelcomeController * current = self.currentController; - [Statistics logEvent:kStatEventName(kStatWhatsNew, [[current class] udWelcomeWasShownKey]) - withParameters:@{kStatAction : kStatNext}]; - self.currentController = static_cast<MWMWelcomeController *>([self.pageControllerDataSource - pageViewController:self - viewControllerAfterViewController:current]); -} - -- (void)show -{ - [Statistics logEvent:kStatEventName(kStatWhatsNew, [self.welcomeClass udWelcomeWasShownKey]) - withParameters:@{kStatAction : kStatOpen}]; - [self configure]; - UIViewController<MWMPageControllerProtocol> * parent = self.parent; - if (IPAD) - [parent.view addSubview:self.iPadBackgroundView]; - [parent addChildViewController:self]; - [parent.view addSubview:self.view]; - [self didMoveToParentViewController:parent]; -} - -#pragma mark - Private methods - -- (void)configure -{ - UIView * mainView = self.view; - UIView * parentView = self.parent.view; - CGSize const size = IPAD ? CGSizeMake(520.0, 600.0) : parentView.size; - CGPoint const origin = IPAD ? CGPointMake(parentView.center.x - size.width / 2, - parentView.center.y - size.height / 2) - : CGPointZero; - mainView.frame = {origin, size}; - mainView.backgroundColor = [UIColor white]; - if (IPAD) - { - self.iPadBackgroundView = [[SolidTouchView alloc] initWithFrame:parentView.bounds]; - self.iPadBackgroundView.backgroundColor = [UIColor colorWithWhite:0. alpha:0.67]; - self.iPadBackgroundView.autoresizingMask = - UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; - mainView.layer.cornerRadius = 5.; - } -} - -- (void)viewWillTransitionToSize:(CGSize)size - withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator -{ - [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; - [coordinator - animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { - if (IPAD) - self.view.center = {size.width / 2, size.height / 2}; - else - self.view.origin = {}; - } - completion:nil]; -} - -#pragma mark - Properties - -- (MWMWelcomeController *)currentController { return self.viewControllers.firstObject; } -- (void)setCurrentController:(MWMWelcomeController *)currentController -{ - if (!currentController || self.isAnimatingTransition) - return; - self.isAnimatingTransition = YES; - __weak auto weakSelf = self; - NSArray<UIViewController *> * viewControllers = @[ currentController ]; - UIPageViewControllerNavigationDirection const direction = - UIPageViewControllerNavigationDirectionForward; - // Workaround for crash: http://crashes.to/s/8101d0400f6 - // Related discussions: - // http://stackoverflow.com/questions/14220289/removing-a-view-controller-from-uipageviewcontroller - // http://stackoverflow.com/questions/25740245/assertion-failure-in-uipageviewcontroller - [self setViewControllers:viewControllers - direction:direction - animated:YES - completion:^(BOOL finished) { - if (finished) - { - dispatch_async(dispatch_get_main_queue(), ^{ - [weakSelf setViewControllers:viewControllers - direction:direction - animated:NO - completion:^(BOOL finished) { - dispatch_async(dispatch_get_main_queue(), ^{ - weakSelf.isAnimatingTransition = NO; - }); - }]; - }); - } - }]; -} - -- (void)setPageControllerDataSource:(MWMPageControllerDataSource *)pageControllerDataSource -{ - [pageControllerDataSource setPageController:self]; - self.dataSource = pageControllerDataSource; - self.currentController = [pageControllerDataSource firstWelcomeController]; - self.isAnimatingTransition = NO; - _pageControllerDataSource = pageControllerDataSource; -} - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.h deleted file mode 100644 index 4602bd487b..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.h +++ /dev/null @@ -1,9 +0,0 @@ -#import "MWMWelcomeController.h" - -NS_CLASS_AVAILABLE_IOS(8_0) @interface MWMPageControllerDataSource : NSObject <UIPageViewControllerDataSource> - -- (instancetype)initWithWelcomeClass:(Class<MWMWelcomeControllerProtocol>)welcomeClass; -- (MWMWelcomeController *)firstWelcomeController; -- (void)setPageController:(MWMPageController *)pageController; - -@end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.mm deleted file mode 100644 index 3f59af9a68..0000000000 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.mm +++ /dev/null @@ -1,71 +0,0 @@ -#import "MWMPageController.h" -#import "MWMPageControllerDataSource.h" - -@interface MWMPageControllerDataSource () - -@property (nonatomic) Class<MWMWelcomeControllerProtocol> welcomeClass; -@property (copy, nonatomic) NSArray<MWMWelcomeController *> * controllers; - -@end - -@implementation MWMPageControllerDataSource - -- (instancetype)initWithWelcomeClass:(Class<MWMWelcomeControllerProtocol>)welcomeClass -{ - self = [super init]; - if (self) - { - _welcomeClass = welcomeClass; - NSMutableArray<MWMWelcomeController *> * controllers = [@[] mutableCopy]; - for (NSInteger index = 0; index < [self.welcomeClass pagesCount]; ++index) - { - MWMWelcomeController * vc = [self.welcomeClass welcomeController]; - vc.pageIndex = index; - [controllers addObject:vc]; - } - self.controllers = controllers; - } - return self; -} - -- (MWMWelcomeController *)firstWelcomeController -{ - return self.controllers.firstObject; -} - -- (void)setPageController:(MWMPageController *)pageController -{ - for (MWMWelcomeController * vc in self.controllers) - vc.pageController = pageController; -} - -#pragma mark - UIPageViewControllerDataSource - -- (NSInteger)presentationIndexForPageViewController:(UIPageViewController *)pageViewController -{ - MWMWelcomeController * controller = pageViewController.viewControllers.firstObject; - return [self.controllers indexOfObject:controller]; -} - -- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController -{ - return [self.welcomeClass pagesCount]; -} - -- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(MWMWelcomeController *)viewController -{ - NSUInteger const index = [self.controllers indexOfObject:viewController]; - NSAssert(index != NSNotFound, @"Invalid controller index"); - BOOL const isFirstController = (index == 0); - return isFirstController ? nil : self.controllers[index - 1]; -} - -- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(MWMWelcomeController *)viewController -{ - NSUInteger const index = [self.controllers indexOfObject:viewController]; - NSAssert(index != NSNotFound, @"Invalid controller index"); - BOOL const isLastController = (index == [self.welcomeClass pagesCount] - 1); - return isLastController ? nil : self.controllers[index + 1]; -} - -@end diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm index 555c0418a2..4a54ff4ddf 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm @@ -1,9 +1,11 @@ #import "MWMNavigationInfoView.h" #import "AppInfo.h" -#import "MWMCommon.h" +#import "CLLocation+Mercator.h" #import "MWMButton.h" +#import "MWMCommon.h" #import "MWMLocationHelpers.h" #import "MWMLocationManager.h" +#import "MWMLocationObserver.h" #import "MWMMapViewControlsManager.h" #import "MWMMapWidgets.h" #import "MWMRouter.h" diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h index fb9a5ce144..2a65449e45 100644 --- a/iphone/Maps/Classes/MapViewController.h +++ b/iphone/Maps/Classes/MapViewController.h @@ -1,6 +1,6 @@ #import "MWMMapDownloaderTypes.h" -#import "MWMPageController.h" #import "MWMViewController.h" +#import "SwiftBridge.h" #include "geometry/point2d.hpp" #include "geometry/rect2d.hpp" @@ -39,6 +39,6 @@ struct AddressInfo; @property(nonatomic, readonly) MWMMapViewControlsManager * controlsManager; @property(nonatomic) MWMAPIBar * apiBar; -@property(nonatomic) MWMPageController * pageViewController; +@property(nonatomic) MWMWelcomePageController * welcomePageController; @end diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 3dda1ec85d..7036f13a5b 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -10,9 +10,7 @@ #import "MWMAuthorizationWebViewLoginViewController.h" #import "MWMEditBookmarkController.h" #import "MWMEditorViewController.h" -#import "MWMFirstLaunchController.h" #import "MWMFrameworkListener.h" -#import "MWMFrameworkObservers.h" #import "MWMLocationHelpers.h" #import "MWMLocationManager.h" #import "MWMMapDownloadDialog.h" @@ -25,7 +23,6 @@ #import "MWMSettings.h" #import "MWMStorage.h" #import "MWMTableViewController.h" -#import "MWMWhatsNewTrafficController.h" #import "MapsAppDelegate.h" #import "Statistics.h" #import "UIViewController+Navigation.h" @@ -97,7 +94,7 @@ BOOL gIsFirstMyPositionMode = YES; @end @interface MapViewController ()<MWMFrameworkDrapeObserver, MWMFrameworkStorageObserver, - MWMPageControllerProtocol> + MWMWelcomePageControllerProtocol> @property(nonatomic, readwrite) MWMMapViewControlsManager * controlsManager; @@ -237,7 +234,7 @@ BOOL gIsFirstMyPositionMode = YES; { [self.alertController viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; [self.controlsManager viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; - [self.pageViewController viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; + [self.welcomePageController viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; } - (void)didReceiveMemoryWarning @@ -281,28 +278,13 @@ BOOL gIsFirstMyPositionMode = YES; - (void)showWelcomeScreenIfNeeded { - Class<MWMWelcomeControllerProtocol> whatsNewClass = [MWMWhatsNewTrafficController class]; - BOOL const isFirstSession = [Alohalytics isFirstSession]; - Class<MWMWelcomeControllerProtocol> welcomeClass = - isFirstSession ? [MWMFirstLaunchController class] : whatsNewClass; - - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - if ([ud boolForKey:[welcomeClass udWelcomeWasShownKey]]) - return; - - self.pageViewController = - [MWMPageController pageControllerWithParent:self welcomeClass:welcomeClass]; - [self.pageViewController show]; - - [ud setBool:YES forKey:[whatsNewClass udWelcomeWasShownKey]]; - [ud setBool:YES forKey:[welcomeClass udWelcomeWasShownKey]]; - [ud synchronize]; + self.welcomePageController = [MWMWelcomePageController controllerWithParent:self]; } -- (void)closePageController:(MWMPageController *)pageController +- (void)closePageController:(MWMWelcomePageController *)pageController { - if ([pageController isEqual:self.pageViewController]) - self.pageViewController = nil; + if ([pageController isEqual:self.welcomePageController]) + self.welcomePageController = nil; } - (void)showViralAlertIfNeeded @@ -410,7 +392,7 @@ BOOL gIsFirstMyPositionMode = YES; - (void)processMyPositionStateModeEvent:(location::EMyPositionMode)mode { - [MWMLocationManager setMyPositionMode:mode]; + location_helpers::setMyPositionMode(mode); [self.controlsManager processMyPositionStateModeEvent:mode]; self.disableStandbyOnLocationStateMode = NO; switch (mode) @@ -425,7 +407,7 @@ BOOL gIsFirstMyPositionMode = YES; else { BOOL const isMapVisible = (self.navigationController.visibleViewController == self); - if (isMapVisible && !location_helpers::isLocationProhibited()) + if (isMapVisible && ![MWMLocationManager isLocationProhibited]) { [self.alertController presentLocationNotFoundAlertWithOkBlock:^{ GetFramework().SwitchMyPositionNextMode(); diff --git a/iphone/Maps/Classes/MapsAppDelegate.h b/iphone/Maps/Classes/MapsAppDelegate.h index cc8cc96a74..86a2ece033 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.h +++ b/iphone/Maps/Classes/MapsAppDelegate.h @@ -37,8 +37,6 @@ typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode) { - (BOOL)hasApiURL; -+ (void)initPushNotificationsWithLaunchOptions:(NSDictionary *)launchOptions; - - (void)enableStandby; - (void)disableStandby; diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 7ca07a44f7..506c49db2b 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -2,19 +2,19 @@ #import <CoreSpotlight/CoreSpotlight.h> #import <CoreTelephony/CTTelephonyNetworkInfo.h> #import <FBSDKCoreKit/FBSDKCoreKit.h> -#import <Pushwoosh/PushNotificationManager.h> #import "AppInfo.h" -#import "MWMCommon.h" #import "EAGLView.h" #import "LocalNotificationManager.h" #import "MWMAlertViewController.h" #import "MWMAuthorizationCommon.h" +#import "MWMCommon.h" #import "MWMController.h" #import "MWMFrameworkListener.h" #import "MWMFrameworkObservers.h" #import "MWMKeyboard.h" #import "MWMLocationManager.h" #import "MWMMapViewControlsManager.h" +#import "MWMPushNotifications.h" #import "MWMRouter.h" #import "MWMRouterSavedState.h" #import "MWMSearch+CoreSpotlight.h" @@ -40,7 +40,7 @@ // If you have a "missing header error" here, then please run configure.sh script in the root repo // folder. -#import "../../../private.h" +#import "private.h" #ifdef OMIM_PRODUCTION @@ -60,7 +60,6 @@ static NSString * const kUDLastRateRequestDate = @"LastRateRequestDate"; extern NSString * const kUDAlreadySharedKey = @"UserAlreadyShared"; static NSString * const kUDLastShareRequstDate = @"LastShareRequestDate"; static NSString * const kUDAutoNightModeOff = @"AutoNightModeOff"; -static NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken"; static NSString * const kIOSIDFA = @"IFA"; static NSString * const kBundleVersion = @"BundleVersion"; @@ -167,41 +166,20 @@ using namespace osm_auth_ios; #pragma mark - Notifications -+ (void)initPushNotificationsWithLaunchOptions:(NSDictionary *)launchOptions -{ - // Do not initialize Pushwoosh for open-source version. - if (string(PUSHWOOSH_APPLICATION_ID).empty()) - return; - [PushNotificationManager - initializeWithAppCode:@(PUSHWOOSH_APPLICATION_ID) - appName:[[NSBundle mainBundle] - objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; - PushNotificationManager * pushManager = [PushNotificationManager pushManager]; - - if (launchOptions) - [pushManager handlePushReceived:launchOptions]; - - // make sure we count app open in Pushwoosh stats - [pushManager sendAppOpen]; - - // register for push notifications! - [pushManager registerForPushNotifications]; -} - // system push notification registration success callback, delegate to pushManager - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - PushNotificationManager * pushManager = [PushNotificationManager pushManager]; - [pushManager handlePushRegistration:deviceToken]; - [Alohalytics logEvent:kPushDeviceTokenLogEvent withValue:pushManager.getHWID]; + [MWMPushNotifications application:application + didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; } // system push notification registration error callback, delegate to pushManager - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { - [[PushNotificationManager pushManager] handlePushRegistrationFailure:error]; + [MWMPushNotifications application:application + didFailToRegisterForRemoteNotificationsWithError:error]; } // system push notifications callback, delegate to pushManager @@ -209,23 +187,9 @@ using namespace osm_auth_ios; didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - [Statistics logEvent:kStatEventName(kStatApplication, kStatPushReceived) withParameters:userInfo]; - if (![self handleURLPush:userInfo]) - [[PushNotificationManager pushManager] handlePushReceived:userInfo]; - completionHandler(UIBackgroundFetchResultNoData); -} - -- (BOOL)handleURLPush:(NSDictionary *)userInfo -{ - auto app = UIApplication.sharedApplication; - if (app.applicationState != UIApplicationStateInactive) - return NO; - NSString * openLink = userInfo[@"openURL"]; - if (!openLink) - return NO; - NSURL * url = [NSURL URLWithString:openLink]; - [app openURL:url]; - return YES; + [MWMPushNotifications application:application + didReceiveRemoteNotification:userInfo + fetchCompletionHandler:completionHandler]; } - (BOOL)isDrapeEngineCreated @@ -470,7 +434,7 @@ using namespace osm_auth_ios; else [Alohalytics disable]; [self incrementSessionsCountAndCheckForAlert]; - [MapsAppDelegate initPushNotificationsWithLaunchOptions:launchOptions]; + [MWMPushNotifications setup:launchOptions]; } [self enableTTSForTheFirstTime]; @@ -666,7 +630,7 @@ using namespace osm_auth_ios; - (void)applicationDidBecomeActive:(UIApplication *)application { LOG(LINFO, ("applicationDidBecomeActive")); - LOG(LINFO, ("Pushwoosh: ", [[PushNotificationManager pushManager] getPushToken].UTF8String)); + LOG(LINFO, ("Pushwoosh: ", [MWMPushNotifications pushToken].UTF8String)); [self.mapViewController onGetFocus:YES]; [self handleURLs]; [[Statistics instance] applicationDidBecomeActive]; diff --git a/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm b/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm index 02d414ab85..05b1ebb77c 100644 --- a/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm +++ b/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm @@ -1,7 +1,8 @@ #import "MWMMapDownloadDialog.h" -#import "MWMCommon.h" +#import "CLLocation+Mercator.h" #import "MWMAlertViewController.h" #import "MWMCircularProgress.h" +#import "MWMCommon.h" #import "MWMFrameworkListener.h" #import "MWMFrameworkObservers.h" #import "MWMLocationManager.h" diff --git a/iphone/Maps/Common/Common.swift b/iphone/Maps/Common/Common.swift index 98a5f8d8b5..9122f11925 100644 --- a/iphone/Maps/Common/Common.swift +++ b/iphone/Maps/Common/Common.swift @@ -1,3 +1,5 @@ import Foundation +func IPAD() -> Bool { return UI_USER_INTERFACE_IDIOM() == .pad } + func L(_ key: String) -> String { return NSLocalizedString(key, comment: "") } diff --git a/iphone/Maps/Classes/Framework/Framework.cpp b/iphone/Maps/Core/Framework/Framework.cpp index 7a0f745ec9..7a0f745ec9 100644 --- a/iphone/Maps/Classes/Framework/Framework.cpp +++ b/iphone/Maps/Core/Framework/Framework.cpp diff --git a/iphone/Maps/Classes/Framework/Framework.h b/iphone/Maps/Core/Framework/Framework.h index 4b8e720c7e..4b8e720c7e 100644 --- a/iphone/Maps/Classes/Framework/Framework.h +++ b/iphone/Maps/Core/Framework/Framework.h diff --git a/iphone/Maps/Core/Framework/MWMFrameworkHelper.h b/iphone/Maps/Core/Framework/MWMFrameworkHelper.h new file mode 100644 index 0000000000..3d1ff0fd6d --- /dev/null +++ b/iphone/Maps/Core/Framework/MWMFrameworkHelper.h @@ -0,0 +1,5 @@ +@interface MWMFrameworkHelper : NSObject + ++ (void)zoomToCurrentPosition; + +@end diff --git a/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm b/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm new file mode 100644 index 0000000000..aab338b735 --- /dev/null +++ b/iphone/Maps/Core/Framework/MWMFrameworkHelper.mm @@ -0,0 +1,19 @@ +#import "MWMFrameworkHelper.h" +#import "CLLocation+Mercator.h" +#import "MWMLocationManager.h" + +#include "Framework.h" + +@implementation MWMFrameworkHelper + ++ (void)zoomToCurrentPosition +{ + auto & f = GetFramework(); + CLLocation * lastLocation = [MWMLocationManager lastLocation]; + if (!lastLocation) + f.SwitchMyPositionNextMode(); + else + f.SetViewportCenter(lastLocation.mercator, 13 /* zoom */); +} + +@end diff --git a/iphone/Maps/Classes/Framework/MWMFrameworkListener.h b/iphone/Maps/Core/Framework/MWMFrameworkListener.h index a301706800..b7cfa27c7d 100644 --- a/iphone/Maps/Classes/Framework/MWMFrameworkListener.h +++ b/iphone/Maps/Core/Framework/MWMFrameworkListener.h @@ -12,7 +12,8 @@ - (instancetype)copy __attribute__((unavailable("call +listener instead"))); - (instancetype)copyWithZone:(NSZone *)zone __attribute__((unavailable("call +listener instead"))); + (instancetype)alloc __attribute__((unavailable("call +listener instead"))); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable("call +listener instead"))); -+ (instancetype)new __attribute__((unavailable("call +listener instead"))); ++ (instancetype)allocWithZone:(struct _NSZone *)zone + __attribute__((unavailable("call +listener instead"))); ++ (instancetype) new __attribute__((unavailable("call +listener instead"))); @end diff --git a/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm b/iphone/Maps/Core/Framework/MWMFrameworkListener.mm index 2789fc2aba..76ad0afd84 100644 --- a/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm +++ b/iphone/Maps/Core/Framework/MWMFrameworkListener.mm @@ -1,5 +1,5 @@ -#import "MapsAppDelegate.h" #import "MWMFrameworkListener.h" +#import "MapsAppDelegate.h" #include "Framework.h" @@ -22,8 +22,7 @@ using TLoopBlock = void (^)(__kindof TObserver observer); void loopWrappers(TObservers * observers, TLoopBlock block) { - dispatch_async(dispatch_get_main_queue(), ^ - { + dispatch_async(dispatch_get_main_queue(), ^{ for (TObserver observer in observers) { if (observer) @@ -31,13 +30,13 @@ void loopWrappers(TObservers * observers, TLoopBlock block) } }); } -} // namespace +} // namespace @interface MWMFrameworkListener () -@property (nonatomic) TObservers * routeBuildingObservers; -@property (nonatomic) TObservers * storageObservers; -@property (nonatomic) TObservers * drapeObservers; +@property(nonatomic) TObservers * routeBuildingObservers; +@property(nonatomic) TObservers * storageObservers; +@property(nonatomic) TObservers * drapeObservers; @end @@ -47,14 +46,15 @@ void loopWrappers(TObservers * observers, TLoopBlock block) { static MWMFrameworkListener * listener; static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ listener = [[super alloc] initListener]; }); + dispatch_once(&onceToken, ^{ + listener = [[super alloc] initListener]; + }); return listener; } + (void)addObserver:(TObserver)observer { - dispatch_async(dispatch_get_main_queue(), ^ - { + dispatch_async(dispatch_get_main_queue(), ^{ MWMFrameworkListener * listener = [MWMFrameworkListener listener]; if ([observer conformsToProtocol:pRouteBuildingObserver]) [listener.routeBuildingObservers addObject:observer]; @@ -67,8 +67,7 @@ void loopWrappers(TObservers * observers, TLoopBlock block) + (void)removeObserver:(TObserver)observer { - dispatch_async(dispatch_get_main_queue(), ^ - { + dispatch_async(dispatch_get_main_queue(), ^{ MWMFrameworkListener * listener = [MWMFrameworkListener listener]; [listener.routeBuildingObservers removeObject:observer]; [listener.storageObservers removeObject:observer]; @@ -100,22 +99,21 @@ void loopWrappers(TObservers * observers, TLoopBlock block) using namespace storage; TObservers * observers = self.routeBuildingObservers; auto & f = GetFramework(); - // TODO(ldragunov,rokuz): Thise two routing callbacks are the only framework callbacks which does not guarantee + // TODO(ldragunov,rokuz): Thise two routing callbacks are the only framework callbacks which does + // not guarantee // that they are called on a main UI thread context. Discuss it with Lev. // Simplest solution is to insert RunOnGuiThread() call in the core where callbacks are called. - // This will help to avoid unnecessary parameters copying and will make all our framework callbacks + // This will help to avoid unnecessary parameters copying and will make all our framework + // callbacks // consistent: every notification to UI will run on a main UI thread. - f.SetRouteBuildingListener([observers](IRouter::ResultCode code, TCountriesVec const & absentCountries) - { - loopWrappers(observers, [code, absentCountries](TRouteBuildingObserver observer) - { - [observer processRouteBuilderEvent:code countries:absentCountries]; - }); - }); - f.SetRouteProgressListener([observers](float progress) - { - loopWrappers(observers, [progress](TRouteBuildingObserver observer) - { + f.SetRouteBuildingListener( + [observers](IRouter::ResultCode code, TCountriesVec const & absentCountries) { + loopWrappers(observers, [code, absentCountries](TRouteBuildingObserver observer) { + [observer processRouteBuilderEvent:code countries:absentCountries]; + }); + }); + f.SetRouteProgressListener([observers](float progress) { + loopWrappers(observers, [progress](TRouteBuildingObserver observer) { if ([observer respondsToSelector:@selector(processRouteBuilderProgress:)]) [observer processRouteBuilderProgress:progress]; }); @@ -128,19 +126,18 @@ void loopWrappers(TObservers * observers, TLoopBlock block) { TObservers * observers = self.storageObservers; auto & s = GetFramework().GetStorage(); - s.Subscribe([observers](TCountryId const & countryId) - { - for (TStorageObserver observer in observers) - [observer processCountryEvent:countryId]; - }, - [observers](TCountryId const & countryId, MapFilesDownloader::TProgress const & progress) - { - for (TStorageObserver observer in observers) - { - if ([observer respondsToSelector:@selector(processCountry:progress:)]) - [observer processCountry:countryId progress:progress]; - } - }); + s.Subscribe( + [observers](TCountryId const & countryId) { + for (TStorageObserver observer in observers) + [observer processCountryEvent:countryId]; + }, + [observers](TCountryId const & countryId, MapFilesDownloader::TProgress const & progress) { + for (TStorageObserver observer in observers) + { + if ([observer respondsToSelector:@selector(processCountry:progress:)]) + [observer processCountry:countryId progress:progress]; + } + }); } #pragma mark - MWMFrameworkDrapeObserver @@ -149,8 +146,7 @@ void loopWrappers(TObservers * observers, TLoopBlock block) { TObservers * observers = self.drapeObservers; auto & f = GetFramework(); - f.SetCurrentCountryChangedListener([observers](TCountryId const & countryId) - { + f.SetCurrentCountryChangedListener([observers](TCountryId const & countryId) { for (TDrapeObserver observer in observers) [observer processViewportCountryEvent:countryId]; }); diff --git a/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h b/iphone/Maps/Core/Framework/MWMFrameworkObservers.h index bc230eb01e..49cff62c71 100644 --- a/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h +++ b/iphone/Maps/Core/Framework/MWMFrameworkObservers.h @@ -4,11 +4,11 @@ using namespace storage; -@protocol MWMFrameworkObserver <NSObject> +@protocol MWMFrameworkObserver<NSObject> @end -@protocol MWMFrameworkRouteBuilderObserver <MWMFrameworkObserver> +@protocol MWMFrameworkRouteBuilderObserver<MWMFrameworkObserver> - (void)processRouteBuilderEvent:(routing::IRouter::ResultCode)code countries:(storage::TCountriesVec const &)absentCountries; @@ -19,17 +19,18 @@ using namespace storage; @end -@protocol MWMFrameworkStorageObserver <MWMFrameworkObserver> +@protocol MWMFrameworkStorageObserver<MWMFrameworkObserver> - (void)processCountryEvent:(TCountryId const &)countryId; @optional -- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress; +- (void)processCountry:(TCountryId const &)countryId + progress:(MapFilesDownloader::TProgress const &)progress; @end -@protocol MWMFrameworkDrapeObserver <MWMFrameworkObserver> +@protocol MWMFrameworkDrapeObserver<MWMFrameworkObserver> - (void)processViewportCountryEvent:(TCountryId const &)countryId; diff --git a/iphone/Maps/Core/Location/MWMLocationHelpers.h b/iphone/Maps/Core/Location/MWMLocationHelpers.h index 1120fb5024..a676ac9410 100644 --- a/iphone/Maps/Core/Location/MWMLocationHelpers.h +++ b/iphone/Maps/Core/Location/MWMLocationHelpers.h @@ -83,12 +83,6 @@ static inline BOOL isMyPositionPendingOrNoPosition() mode == location::EMyPositionMode::NotFollowNoPosition; } -static inline BOOL isLocationProhibited() -{ - auto const status = [MWMLocationManager lastLocationStatus]; - return status == location::TLocationError::EDenied || status == location::TLocationError::EGPSIsOff; -} - static inline double headingToNorthRad(CLHeading * heading) { double north = -1.0; @@ -108,5 +102,24 @@ static inline m2::PointD ToMercator(CLLocationCoordinate2D const & l) } static inline m2::PointD ToMercator(ms::LatLon const & l) { return MercatorBounds::FromLatLon(l); } +static inline void setMyPositionMode(location::EMyPositionMode mode) +{ + MWMMyPositionMode mwmMode; + switch (mode) + { + case location::EMyPositionMode::PendingPosition: + mwmMode = MWMMyPositionModePendingPosition; + break; + case location::EMyPositionMode::NotFollowNoPosition: + mwmMode = MWMMyPositionModeNotFollowNoPosition; + break; + case location::EMyPositionMode::NotFollow: mwmMode = MWMMyPositionModeNotFollow; break; + case location::EMyPositionMode::Follow: mwmMode = MWMMyPositionModeFollow; break; + case location::EMyPositionMode::FollowAndRotate: + mwmMode = MWMMyPositionModeFollowAndRotate; + break; + } + [MWMLocationManager setMyPositionMode:mwmMode]; +} } // namespace MWMLocationHelpers diff --git a/iphone/Maps/Core/Location/MWMLocationManager.h b/iphone/Maps/Core/Location/MWMLocationManager.h index 83a15aa4d9..05af150421 100644 --- a/iphone/Maps/Core/Location/MWMLocationManager.h +++ b/iphone/Maps/Core/Location/MWMLocationManager.h @@ -1,15 +1,18 @@ -#import "CLLocation+Mercator.h" -#import "MWMLocationObserver.h" +#import "MWMMyPositionMode.h" + +@protocol MWMLocationObserver; @interface MWMLocationManager : NSObject ++ (void)start; + + (void)addObserver:(id<MWMLocationObserver>)observer; + (void)removeObserver:(id<MWMLocationObserver>)observer; -+ (void)setMyPositionMode:(location::EMyPositionMode)mode; ++ (void)setMyPositionMode:(MWMMyPositionMode)mode; + (CLLocation *)lastLocation; -+ (location::TLocationError)lastLocationStatus; ++ (BOOL)isLocationProhibited; + (CLHeading *)lastHeading; + (void)applicationDidBecomeActive; diff --git a/iphone/Maps/Core/Location/MWMLocationManager.mm b/iphone/Maps/Core/Location/MWMLocationManager.mm index 670821adfe..966930b25f 100644 --- a/iphone/Maps/Core/Location/MWMLocationManager.mm +++ b/iphone/Maps/Core/Location/MWMLocationManager.mm @@ -1,8 +1,9 @@ #import "MWMLocationManager.h" #import <Pushwoosh/PushNotificationManager.h> -#import "MWMCommon.h" #import "MWMAlertViewController.h" +#import "MWMCommon.h" #import "MWMController.h" +#import "MWMLocationObserver.h" #import "MWMLocationPredictor.h" #import "MapsAppDelegate.h" #import "Statistics.h" @@ -196,7 +197,7 @@ void setPermissionRequested() { self.locationManager.delegate = nil; } - ++ (void)start { [self manager].started = YES; } #pragma mark - Add/Remove Observers + (void)addObserver:(TObserver)observer @@ -220,7 +221,7 @@ void setPermissionRequested() + (void)applicationDidBecomeActive { if (isPermissionRequested() || ![Alohalytics isFirstSession]) - [self manager].started = YES; + [self start]; } + (void)applicationWillResignActive @@ -245,9 +246,11 @@ void setPermissionRequested() return manager.lastLocationInfo; } -+ (location::TLocationError)lastLocationStatus ++ (BOOL)isLocationProhibited { - return [self manager].lastLocationStatus; + auto const status = [self manager].lastLocationStatus; + return status == location::TLocationError::EDenied || + status == location::TLocationError::EGPSIsOff; } + (CLHeading *)lastHeading @@ -335,7 +338,7 @@ void setPermissionRequested() #pragma mark - My Position -+ (void)setMyPositionMode:(location::EMyPositionMode)mode ++ (void)setMyPositionMode:(MWMMyPositionMode)mode { MWMLocationManager * manager = [self manager]; [manager.predictor setMyPositionMode:mode]; @@ -355,13 +358,11 @@ void setPermissionRequested() { switch (mode) { - case location::EMyPositionMode::PendingPosition: manager.geoMode = GeoMode::Pending; break; - case location::EMyPositionMode::NotFollowNoPosition: - case location::EMyPositionMode::NotFollow: manager.geoMode = GeoMode::NotInPosition; break; - case location::EMyPositionMode::Follow: manager.geoMode = GeoMode::InPosition; break; - case location::EMyPositionMode::FollowAndRotate: - manager.geoMode = GeoMode::FollowAndRotate; - break; + case MWMMyPositionModePendingPosition: manager.geoMode = GeoMode::Pending; break; + case MWMMyPositionModeNotFollowNoPosition: + case MWMMyPositionModeNotFollow: manager.geoMode = GeoMode::NotInPosition; break; + case MWMMyPositionModeFollow: manager.geoMode = GeoMode::InPosition; break; + case MWMMyPositionModeFollowAndRotate: manager.geoMode = GeoMode::FollowAndRotate; break; } } } diff --git a/iphone/Maps/Core/Location/MWMLocationPredictor.h b/iphone/Maps/Core/Location/MWMLocationPredictor.h index 2bdda7adce..c1cd4927e9 100644 --- a/iphone/Maps/Core/Location/MWMLocationPredictor.h +++ b/iphone/Maps/Core/Location/MWMLocationPredictor.h @@ -1,3 +1,5 @@ +#import "MWMMyPositionMode.h" + #include "platform/location.hpp" using TPredictionBlock = void (^)(location::GpsInfo const &); @@ -6,6 +8,6 @@ using TPredictionBlock = void (^)(location::GpsInfo const &); - (instancetype)initWithOnPredictionBlock:(TPredictionBlock)onPredictBlock; - (void)reset:(location::GpsInfo const &)info; -- (void)setMyPositionMode:(location::EMyPositionMode)mode; +- (void)setMyPositionMode:(MWMMyPositionMode)mode; @end diff --git a/iphone/Maps/Core/Location/MWMLocationPredictor.mm b/iphone/Maps/Core/Location/MWMLocationPredictor.mm index 886a856f26..5e12023c94 100644 --- a/iphone/Maps/Core/Location/MWMLocationPredictor.mm +++ b/iphone/Maps/Core/Location/MWMLocationPredictor.mm @@ -28,9 +28,9 @@ NSUInteger constexpr kMaxPredictionCount = 20; return self; } -- (void)setMyPositionMode:(location::EMyPositionMode)mode +- (void)setMyPositionMode:(MWMMyPositionMode)mode { - self.isLastPositionModeValid = (mode == location::FollowAndRotate); + self.isLastPositionModeValid = (mode == MWMMyPositionModeFollowAndRotate); [self restart]; } diff --git a/iphone/Maps/Core/Location/MWMMyPositionMode.h b/iphone/Maps/Core/Location/MWMMyPositionMode.h new file mode 100644 index 0000000000..64e8fbbca1 --- /dev/null +++ b/iphone/Maps/Core/Location/MWMMyPositionMode.h @@ -0,0 +1,7 @@ +typedef NS_ENUM(NSUInteger, MWMMyPositionMode) { + MWMMyPositionModePendingPosition, + MWMMyPositionModeNotFollowNoPosition, + MWMMyPositionModeNotFollow, + MWMMyPositionModeFollow, + MWMMyPositionModeFollowAndRotate +}; diff --git a/iphone/Maps/Classes/LocalNotificationManager.h b/iphone/Maps/Core/Notifications/LocalNotificationManager.h index bc25531f2f..bc25531f2f 100644 --- a/iphone/Maps/Classes/LocalNotificationManager.h +++ b/iphone/Maps/Core/Notifications/LocalNotificationManager.h diff --git a/iphone/Maps/Classes/LocalNotificationManager.mm b/iphone/Maps/Core/Notifications/LocalNotificationManager.mm index 1ec6a5a2a2..1ec6a5a2a2 100644 --- a/iphone/Maps/Classes/LocalNotificationManager.mm +++ b/iphone/Maps/Core/Notifications/LocalNotificationManager.mm diff --git a/iphone/Maps/Core/Notifications/MWMPushNotifications.h b/iphone/Maps/Core/Notifications/MWMPushNotifications.h new file mode 100644 index 0000000000..41f8d7035a --- /dev/null +++ b/iphone/Maps/Core/Notifications/MWMPushNotifications.h @@ -0,0 +1,15 @@ +@interface MWMPushNotifications : NSObject + ++ (void)setup:(NSDictionary *)launchOptions; + ++ (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; ++ (void)application:(UIApplication *)application + didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; ++ (void)application:(UIApplication *)application + didReceiveRemoteNotification:(NSDictionary *)userInfo + fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; + ++ (NSString *)pushToken; + +@end diff --git a/iphone/Maps/Core/Notifications/MWMPushNotifications.mm b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm new file mode 100644 index 0000000000..a2b1febae0 --- /dev/null +++ b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm @@ -0,0 +1,79 @@ +#import "MWMPushNotifications.h" +#import <Pushwoosh/PushNotificationManager.h> +#import "Statistics.h" + +#import "3party/Alohalytics/src/alohalytics_objc.h" + +// If you have a "missing header error" here, then please run configure.sh script in the root repo +// folder. +#import "private.h" + +#include "std/string.hpp" + +namespace +{ +NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken"; +} // namespace + +@implementation MWMPushNotifications + ++ (void)setup:(NSDictionary *)launchOptions +{ + // Do not initialize Pushwoosh for open-source version. + if (string(PUSHWOOSH_APPLICATION_ID).empty()) + return; + [PushNotificationManager + initializeWithAppCode:@(PUSHWOOSH_APPLICATION_ID) + appName:[[NSBundle mainBundle] + objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; + PushNotificationManager * pushManager = [PushNotificationManager pushManager]; + + if (launchOptions) + [pushManager handlePushReceived:launchOptions]; + + // make sure we count app open in Pushwoosh stats + [pushManager sendAppOpen]; + + // register for push notifications! + [pushManager registerForPushNotifications]; +} + ++ (void)application:(UIApplication *)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken +{ + PushNotificationManager * pushManager = [PushNotificationManager pushManager]; + [pushManager handlePushRegistration:deviceToken]; + [Alohalytics logEvent:kPushDeviceTokenLogEvent withValue:pushManager.getHWID]; +} + ++ (void)application:(UIApplication *)application + didFailToRegisterForRemoteNotificationsWithError:(NSError *)error +{ + [[PushNotificationManager pushManager] handlePushRegistrationFailure:error]; +} + ++ (void)application:(UIApplication *)application + didReceiveRemoteNotification:(NSDictionary *)userInfo + fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler +{ + [Statistics logEvent:kStatEventName(kStatApplication, kStatPushReceived) withParameters:userInfo]; + if (![self handleURLPush:userInfo]) + [[PushNotificationManager pushManager] handlePushReceived:userInfo]; + completionHandler(UIBackgroundFetchResultNoData); +} + ++ (BOOL)handleURLPush:(NSDictionary *)userInfo +{ + auto app = UIApplication.sharedApplication; + if (app.applicationState != UIApplicationStateInactive) + return NO; + NSString * openLink = userInfo[@"openURL"]; + if (!openLink) + return NO; + NSURL * url = [NSURL URLWithString:openLink]; + [app openURL:url]; + return YES; +} + ++ (NSString *)pushToken { return [[PushNotificationManager pushManager] getPushToken]; } +@end diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index 1da3740069..da5419872d 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -1,9 +1,11 @@ #import "MWMRouter.h" #import <Pushwoosh/PushNotificationManager.h> +#import "CLLocation+Mercator.h" #import "MWMAlertViewController.h" #import "MWMFrameworkListener.h" #import "MWMLocationHelpers.h" #import "MWMLocationManager.h" +#import "MWMLocationObserver.h" #import "MWMMapViewControlsManager.h" #import "MWMNavigationDashboardManager.h" #import "MWMRouterSavedState.h" diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 1e86b30c67..60b5a332f8 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -115,9 +115,6 @@ 341522BF1B666A550077AA8F /* MWMAPIBarView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341522BE1B666A550077AA8F /* MWMAPIBarView.mm */; }; 341876B41C28026D005A0C9A /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 454040681AD2D8D2007A9B12 /* CoreVideo.framework */; }; 341876B51C280272005A0C9A /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 454040681AD2D8D2007A9B12 /* CoreVideo.framework */; }; - 341966861E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341966851E000CDD00F96327 /* MWMWhatsNewTrafficController.mm */; }; - 341966871E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341966851E000CDD00F96327 /* MWMWhatsNewTrafficController.mm */; }; - 341966881E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341966851E000CDD00F96327 /* MWMWhatsNewTrafficController.mm */; }; 341C2A571B72092A00AD41A1 /* 02_droidsans-fallback.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9DF04B231B71010E00DACAF1 /* 02_droidsans-fallback.ttf */; }; 341C2A5B1B720B8A00AD41A1 /* MWMAPIBarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 341C2A5A1B720B8A00AD41A1 /* MWMAPIBarView.xib */; }; 341F09841C20138100F18AC5 /* libpugixml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 341F09831C20138100F18AC5 /* libpugixml.a */; }; @@ -129,8 +126,6 @@ 342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342EE4101C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm */; }; 343E8B381D0800520046AEEE /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89331C8983F300940D7F /* libc++.tbd */; }; 3446C6771DDCA9A200146687 /* libtraffic.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3446C6761DDCA9A200146687 /* libtraffic.a */; }; - 34479C7C1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; }; - 34479C7D1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; }; 3454D7B81E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; }; 3454D7B91E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; }; 3454D7BA1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; }; @@ -214,12 +209,36 @@ 34845DB61E166084003D55B9 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34845DB51E166084003D55B9 /* Common.swift */; }; 34845DB71E166084003D55B9 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34845DB51E166084003D55B9 /* Common.swift */; }; 34845DB81E166084003D55B9 /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34845DB51E166084003D55B9 /* Common.swift */; }; + 3486B5071E27A4B50069C126 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */; }; + 3486B5081E27A4B50069C126 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */; }; + 3486B5091E27A4B50069C126 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */; }; + 3486B50C1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */; }; + 3486B50D1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */; }; + 3486B50E1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */; }; + 3486B5151E27AD3B0069C126 /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5101E27AD3B0069C126 /* Framework.cpp */; }; + 3486B5161E27AD3B0069C126 /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5101E27AD3B0069C126 /* Framework.cpp */; }; + 3486B5171E27AD3B0069C126 /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5101E27AD3B0069C126 /* Framework.cpp */; }; + 3486B5181E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */; }; + 3486B5191E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */; }; + 3486B51A1E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */; }; + 3486B51D1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */; }; + 3486B51E1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */; }; + 3486B51F1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */; }; 3490D2DE1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */; }; 3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */; }; 3490D2E01CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */; }; 3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */; }; 3490D2E21CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */; }; 3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */; }; + 34943BB21E2620C600B14F84 /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34943BB11E2620C600B14F84 /* Welcome.storyboard */; }; + 34943BB31E2620C600B14F84 /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34943BB11E2620C600B14F84 /* Welcome.storyboard */; }; + 34943BB41E2620C600B14F84 /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34943BB11E2620C600B14F84 /* Welcome.storyboard */; }; + 34943BB61E26222300B14F84 /* WelcomeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB51E26222300B14F84 /* WelcomeProtocol.swift */; }; + 34943BB71E26222300B14F84 /* WelcomeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB51E26222300B14F84 /* WelcomeProtocol.swift */; }; + 34943BB81E26222300B14F84 /* WelcomeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB51E26222300B14F84 /* WelcomeProtocol.swift */; }; + 34943BBA1E2626B200B14F84 /* WelcomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB91E2626B200B14F84 /* WelcomePageController.swift */; }; + 34943BBB1E2626B200B14F84 /* WelcomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB91E2626B200B14F84 /* WelcomePageController.swift */; }; + 34943BBC1E2626B200B14F84 /* WelcomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB91E2626B200B14F84 /* WelcomePageController.swift */; }; 3497A93A1B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3497A9371B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm */; }; 349A13821DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.mm */; }; 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.mm */; }; @@ -241,16 +260,6 @@ 349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */; }; 349C3AEF1D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */; }; 349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */; }; - 34A759B71DC795090078C3AE /* MWMPageController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B41DC795090078C3AE /* MWMPageController.mm */; }; - 34A759B81DC795090078C3AE /* MWMPageControllerDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B61DC795090078C3AE /* MWMPageControllerDataSource.mm */; }; - 34A759C91DC795140078C3AE /* MWMFirstLaunchController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BA1DC795140078C3AE /* MWMFirstLaunchController.mm */; }; - 34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BC1DC795140078C3AE /* MWMWelcomeController.mm */; }; - 34A759D21DC7953A0078C3AE /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34A759D11DC7953A0078C3AE /* Welcome.storyboard */; }; - 34A759DA1DC797790078C3AE /* MWMFirstLaunchController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BA1DC795140078C3AE /* MWMFirstLaunchController.mm */; }; - 34A759DB1DC797830078C3AE /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34A759D11DC7953A0078C3AE /* Welcome.storyboard */; }; - 34A759DC1DC797880078C3AE /* MWMWelcomeController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BC1DC795140078C3AE /* MWMWelcomeController.mm */; }; - 34A759E31DC797CB0078C3AE /* MWMPageController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B41DC795090078C3AE /* MWMPageController.mm */; }; - 34A759E41DC797CE0078C3AE /* MWMPageControllerDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B61DC795090078C3AE /* MWMPageControllerDataSource.mm */; }; 34AB39C11D2BD8310021857D /* MWMStopButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AB39C01D2BD8310021857D /* MWMStopButton.mm */; }; 34AB39C21D2BD8310021857D /* MWMStopButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AB39C01D2BD8310021857D /* MWMStopButton.mm */; }; 34ABA6161C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6151C2D185B00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm */; }; @@ -285,7 +294,15 @@ 34CA57191C292F50004D9C89 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97C9864B186C5EAA00AF7E9E /* MediaPlayer.framework */; }; 34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */; }; 34D15BA91BD8F93C00C8BCBE /* AddSetTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */; }; - 34DCDE3A1C75CD8100652CAC /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34479C751C60C6130065D261 /* Framework.cpp */; }; + 34D4FA5A1E2642FB003F53EF /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA591E2642FB003F53EF /* Storyboard.swift */; }; + 34D4FA5B1E2642FB003F53EF /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA591E2642FB003F53EF /* Storyboard.swift */; }; + 34D4FA5C1E2642FB003F53EF /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA591E2642FB003F53EF /* Storyboard.swift */; }; + 34D4FA621E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; + 34D4FA631E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; + 34D4FA641E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; + 34D4FA661E265749003F53EF /* WhatsNewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA651E265749003F53EF /* WhatsNewController.swift */; }; + 34D4FA671E265749003F53EF /* WhatsNewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA651E265749003F53EF /* WhatsNewController.swift */; }; + 34D4FA681E265749003F53EF /* WhatsNewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA651E265749003F53EF /* WhatsNewController.swift */; }; 34EB5E7D1C900145002C4D37 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89341C8983F300940D7F /* QuickLook.framework */; }; 34EB5E7E1C900159002C4D37 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89301C89837900940D7F /* AssetsLibrary.framework */; }; 34EF94291C05A6F30050B714 /* MWMSegue.mm in Sources */ = {isa = PBXBuildFile; fileRef = F607C18D1C047FDC00B53A87 /* MWMSegue.mm */; }; @@ -322,7 +339,6 @@ 5605022F1B6211E100169CAD /* sound-strings in Resources */ = {isa = PBXBuildFile; fileRef = 5605022E1B6211E100169CAD /* sound-strings */; }; 560634F21B78806100F3D670 /* MWMTextToSpeech.mm in Sources */ = {isa = PBXBuildFile; fileRef = 560634F11B78806100F3D670 /* MWMTextToSpeech.mm */; }; 56C74C391C74A3BC00B71B9F /* MWMInputEmailValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */; }; - 56D545631C74A41900E3719C /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34479C751C60C6130065D261 /* Framework.cpp */; }; 671182E11C7F0DD400CB8177 /* countries_obsolete.txt in Resources */ = {isa = PBXBuildFile; fileRef = 671182DE1C7F0DD400CB8177 /* countries_obsolete.txt */; }; 671182E21C7F0DD400CB8177 /* packed_polygons_obsolete.bin in Resources */ = {isa = PBXBuildFile; fileRef = 671182DF1C7F0DD400CB8177 /* packed_polygons_obsolete.bin */; }; 671182E31C7F0DD400CB8177 /* WorldCoasts_obsolete.mwm in Resources */ = {isa = PBXBuildFile; fileRef = 671182E01C7F0DD400CB8177 /* WorldCoasts_obsolete.mwm */; }; @@ -409,7 +425,6 @@ 6741AA071BF340DE002C974C /* MWMBottomMenuLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6E81BB2DA0C00DB941B /* MWMBottomMenuLayout.mm */; }; 6741AA0A1BF340DE002C974C /* MWMBottomMenuCollectionViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6EB1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.mm */; }; 6741AA0B1BF340DE002C974C /* MWMMapViewControlsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC72111B0DECAE0012A34B /* MWMMapViewControlsManager.mm */; }; - 6741AA0D1BF340DE002C974C /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */; }; 6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 346EDADA1B9F0E35004F8DB5 /* MWMMultilineLabel.mm */; }; 6741AA191BF340DE002C974C /* MWMDownloaderDialogCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F4B6C1B46A51F0081A24A /* MWMDownloaderDialogCell.mm */; }; 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */; }; @@ -496,7 +511,6 @@ 849CF5F91DE842290024A8A5 /* fonts_blacklist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1212F8C9E1006AF8C3 /* fonts_blacklist.txt */; }; 849CF5FA1DE842290024A8A5 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; }; 849CF5FC1DE842290024A8A5 /* resources-xxhdpi_clear in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D15A1B8B4DD700D4EB6F /* resources-xxhdpi_clear */; }; - 849CF5FD1DE842290024A8A5 /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34A759D11DC7953A0078C3AE /* Welcome.storyboard */; }; 849CF5FE1DE842290024A8A5 /* MWMDefaultAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F198C1AB81A00006EAF7E /* MWMDefaultAlert.xib */; }; 849CF5FF1DE842290024A8A5 /* fonts_whitelist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1312F8C9E1006AF8C3 /* fonts_whitelist.txt */; }; 849CF6011DE842290024A8A5 /* MWMDownloaderDialogHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F4B701B4A41D40081A24A /* MWMDownloaderDialogHeader.xib */; }; @@ -572,12 +586,10 @@ 849CF6A01DE842290024A8A5 /* EAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46F26CD710F623BA00ECCA39 /* EAGLView.mm */; }; 849CF6A21DE842290024A8A5 /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; }; 849CF6A41DE842290024A8A5 /* MWMRateAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F61579331AC2CE9A0032D8E9 /* MWMRateAlert.mm */; }; - 849CF6A51DE842290024A8A5 /* MWMPageControllerDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B61DC795090078C3AE /* MWMPageControllerDataSource.mm */; }; 849CF6A71DE842290024A8A5 /* MWMRoutePointCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F6BB6CC51BB18C0900DF1DF2 /* MWMRoutePointCell.m */; }; 849CF6AF1DE842290024A8A5 /* MWMTextView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6588E2B1B15C26700EE1E58 /* MWMTextView.mm */; }; 849CF6B11DE842290024A8A5 /* MWMMapWidgets.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FE4C441BCC013500066718 /* MWMMapWidgets.mm */; }; 849CF6BD1DE842290024A8A5 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342EE4101C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm */; }; - 849CF6BF1DE842290024A8A5 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; }; 849CF6C31DE842290024A8A5 /* MWMEditorViralAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64D9C9E1C899C350063FA30 /* MWMEditorViralAlert.mm */; }; 849CF6C61DE842290024A8A5 /* MWMInputPasswordValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA62B1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm */; }; 849CF6C71DE842290024A8A5 /* MWMAuthorizationOSMLoginViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6151C2D185B00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm */; }; @@ -588,7 +600,6 @@ 849CF6D31DE842290024A8A5 /* MWMMapDownloadDialog.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3406FA141C6E0C3300E9FAD2 /* MWMMapDownloadDialog.mm */; }; 849CF6D51DE842290024A8A5 /* MWMTableViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34C9BCFF1C6DB693000DC38D /* MWMTableViewController.mm */; }; 849CF6D81DE842290024A8A5 /* MWMSegue.mm in Sources */ = {isa = PBXBuildFile; fileRef = F607C18D1C047FDC00B53A87 /* MWMSegue.mm */; }; - 849CF6D91DE842290024A8A5 /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34479C751C60C6130065D261 /* Framework.cpp */; }; 849CF6DC1DE842290024A8A5 /* MWMRoutePreview.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD337E1B62403B00F2CE18 /* MWMRoutePreview.mm */; }; 849CF6DE1DE842290024A8A5 /* MWMRoutePointLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BB6CC21BB1860D00DF1DF2 /* MWMRoutePointLayout.mm */; }; 849CF6DF1DE842290024A8A5 /* MWMAuthorizationCommon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BF0CC51C31304A00D097EB /* MWMAuthorizationCommon.mm */; }; @@ -612,15 +623,12 @@ 849CF7171DE842290024A8A5 /* BookmarksRootVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAAEA7D3161D8D3100CCD661 /* BookmarksRootVC.mm */; }; 849CF7191DE842290024A8A5 /* MWMActivityViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340837121B7243CE00B5C185 /* MWMActivityViewController.mm */; }; 849CF71A1DE842290024A8A5 /* MWMDropDown.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE101C6DEB5A00A453F1 /* MWMDropDown.mm */; }; - 849CF71C1DE842290024A8A5 /* MWMPageController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759B41DC795090078C3AE /* MWMPageController.mm */; }; 849CF71D1DE842290024A8A5 /* MWMNavigationDashboardManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3497A9371B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm */; }; 849CF7211DE842290024A8A5 /* MWMBottomMenuLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6E81BB2DA0C00DB941B /* MWMBottomMenuLayout.mm */; }; 849CF7221DE842290024A8A5 /* MWMBottomMenuCollectionViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6EB1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.mm */; }; 849CF7251DE842290024A8A5 /* MWMMapViewControlsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC72111B0DECAE0012A34B /* MWMMapViewControlsManager.mm */; }; - 849CF7271DE842290024A8A5 /* MWMFirstLaunchController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BA1DC795140078C3AE /* MWMFirstLaunchController.mm */; }; 849CF7281DE842290024A8A5 /* MWMOsmAuthAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD1D1F1CA412920047B8E8 /* MWMOsmAuthAlert.mm */; }; 849CF72B1DE842290024A8A5 /* MWMBookmarkNameCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6B97B251CD0CA990009B612 /* MWMBookmarkNameCell.mm */; }; - 849CF72C1DE842290024A8A5 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */; }; 849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA61F1C2D517500FE1BEC /* MWMInputValidator.mm */; }; 849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6231C2D551900FE1BEC /* MWMInputValidatorFactory.mm */; }; 849CF7371DE842290024A8A5 /* MWMTaxiCollectionLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6F778791DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm */; }; @@ -639,7 +647,6 @@ 849CF7651DE842290024A8A5 /* ColorPickerView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */; }; 849CF7671DE842290024A8A5 /* CircleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB917C2B1E2003E7E92 /* CircleView.mm */; }; 849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; }; - 849CF76C1DE842290024A8A5 /* MWMWelcomeController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34A759BC1DC795140078C3AE /* MWMWelcomeController.mm */; }; 849CF76D1DE842290024A8A5 /* AddSetTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */; }; 849CF76E1DE842290024A8A5 /* MWMEditorViralActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */; }; 849CF7741DE842290024A8A5 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F659FC691CF35C24000A06B1 /* SafariServices.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; @@ -671,7 +678,6 @@ 849CF7971DE842290024A8A5 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD870183620CE00F77A46 /* AdSupport.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 849CF7981DE842290024A8A5 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46F26C7210F61FD600ECCA39 /* OpenGLES.framework */; }; 849CF7991DE842290024A8A5 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEB7E22111E9079400080A68 /* CoreLocation.framework */; }; - 974D041D1977DE430081D0A7 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */; }; 97719D451843B6DC00BDD815 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D441843B6DC00BDD815 /* MessageUI.framework */; }; 97719D491843B6F700BDD815 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D471843B6F200BDD815 /* Security.framework */; }; 978D4A31199A11E600D72CA7 /* faq.html in Resources */ = {isa = PBXBuildFile; fileRef = 978D4A30199A11E600D72CA7 /* faq.html */; }; @@ -1452,8 +1458,6 @@ 3411387C1C15AE73002E3B3E /* libeditor.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libeditor.a; path = "../../../omim-xcode-build/Debug/libeditor.a"; sourceTree = "<group>"; }; 341522BD1B666A550077AA8F /* MWMAPIBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAPIBarView.h; sourceTree = "<group>"; }; 341522BE1B666A550077AA8F /* MWMAPIBarView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAPIBarView.mm; sourceTree = "<group>"; }; - 341966841E000CDD00F96327 /* MWMWhatsNewTrafficController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMWhatsNewTrafficController.h; sourceTree = "<group>"; }; - 341966851E000CDD00F96327 /* MWMWhatsNewTrafficController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMWhatsNewTrafficController.mm; sourceTree = "<group>"; }; 341C2A5A1B720B8A00AD41A1 /* MWMAPIBarView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAPIBarView.xib; sourceTree = "<group>"; }; 341F09831C20138100F18AC5 /* libpugixml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpugixml.a; path = "../../../omim-xcode-build/Debug/libpugixml.a"; sourceTree = "<group>"; }; 34201E0B1DC0E33100D24118 /* libtracking.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtracking.a; path = "../../../omim-xcode-build/Debug/libtracking.a"; sourceTree = "<group>"; }; @@ -1462,11 +1466,6 @@ 342EE40F1C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAuthorizationWebViewLoginViewController.h; sourceTree = "<group>"; }; 342EE4101C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAuthorizationWebViewLoginViewController.mm; sourceTree = "<group>"; }; 3446C6761DDCA9A200146687 /* libtraffic.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtraffic.a; path = "../../../omim-build/xcode/Debug/libtraffic.a"; sourceTree = "<group>"; }; - 34479C751C60C6130065D261 /* Framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Framework.cpp; sourceTree = "<group>"; }; - 34479C761C60C6130065D261 /* Framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Framework.h; sourceTree = "<group>"; }; - 34479C771C60C6130065D261 /* MWMFrameworkListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkListener.h; sourceTree = "<group>"; }; - 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFrameworkListener.mm; sourceTree = "<group>"; }; - 34479C791C60C6130065D261 /* MWMFrameworkObservers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkObservers.h; sourceTree = "<group>"; }; 345050211E028B8000A8DC59 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; }; 3454D7991E07F045004AF2AD /* CALayer+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+RuntimeAttributes.h"; sourceTree = "<group>"; }; 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CALayer+RuntimeAttributes.mm"; sourceTree = "<group>"; }; @@ -1525,12 +1524,27 @@ 34845DAD1E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloaderNoResultsEmbedViewController.swift; sourceTree = "<group>"; }; 34845DB11E165E24003D55B9 /* SearchNoResultsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchNoResultsViewController.swift; sourceTree = "<group>"; }; 34845DB51E166084003D55B9 /* Common.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = "<group>"; }; + 3486B5031E27948F0069C126 /* MWMMyPositionMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMMyPositionMode.h; sourceTree = "<group>"; }; + 3486B5051E27A4B50069C126 /* LocalNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalNotificationManager.h; sourceTree = "<group>"; }; + 3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalNotificationManager.mm; sourceTree = "<group>"; }; + 3486B50A1E27A4C50069C126 /* MWMPushNotifications.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPushNotifications.h; sourceTree = "<group>"; }; + 3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPushNotifications.mm; sourceTree = "<group>"; }; + 3486B5101E27AD3B0069C126 /* Framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Framework.cpp; sourceTree = "<group>"; }; + 3486B5111E27AD3B0069C126 /* Framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Framework.h; sourceTree = "<group>"; }; + 3486B5121E27AD3B0069C126 /* MWMFrameworkListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkListener.h; sourceTree = "<group>"; }; + 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFrameworkListener.mm; sourceTree = "<group>"; }; + 3486B5141E27AD3B0069C126 /* MWMFrameworkObservers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkObservers.h; sourceTree = "<group>"; }; + 3486B51B1E27AD590069C126 /* MWMFrameworkHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkHelper.h; sourceTree = "<group>"; }; + 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFrameworkHelper.mm; sourceTree = "<group>"; }; 348E57981B0F49D8000FA02A /* maps.me dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "maps.me dbg.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 3490D2D91CE9DD2500D0B838 /* MWMSideButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtons.h; sourceTree = "<group>"; }; 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSideButtons.mm; sourceTree = "<group>"; }; 3490D2DB1CE9DD2500D0B838 /* MWMSideButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtonsView.h; sourceTree = "<group>"; }; 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSideButtonsView.mm; sourceTree = "<group>"; }; 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSideButtonsView.xib; sourceTree = "<group>"; }; + 34943BB11E2620C600B14F84 /* Welcome.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Welcome.storyboard; sourceTree = "<group>"; }; + 34943BB51E26222300B14F84 /* WelcomeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeProtocol.swift; sourceTree = "<group>"; }; + 34943BB91E2626B200B14F84 /* WelcomePageController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomePageController.swift; sourceTree = "<group>"; }; 3497A9361B5CF8A900F51E55 /* MWMNavigationDashboardManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNavigationDashboardManager.h; sourceTree = "<group>"; }; 3497A9371B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMNavigationDashboardManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 349A137F1DEC138C00C7DB60 /* MWMMobileInternetAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMobileInternetAlert.h; sourceTree = "<group>"; }; @@ -1553,15 +1567,6 @@ 349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationInfoView.mm; sourceTree = "<group>"; }; 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNavigationInfoView.xib; sourceTree = "<group>"; }; 349C3AF11D33C6EE002AC7A9 /* MWMNavigationDashboardInfoProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMNavigationDashboardInfoProtocol.h; sourceTree = "<group>"; }; - 34A759B31DC795090078C3AE /* MWMPageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWMPageController.h; path = Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.h; sourceTree = SOURCE_ROOT; }; - 34A759B41DC795090078C3AE /* MWMPageController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MWMPageController.mm; path = Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageController.mm; sourceTree = SOURCE_ROOT; }; - 34A759B51DC795090078C3AE /* MWMPageControllerDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWMPageControllerDataSource.h; path = Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.h; sourceTree = SOURCE_ROOT; }; - 34A759B61DC795090078C3AE /* MWMPageControllerDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MWMPageControllerDataSource.mm; path = Classes/CustomViews/MapViewControls/Welcome/PageController/MWMPageControllerDataSource.mm; sourceTree = SOURCE_ROOT; }; - 34A759B91DC795140078C3AE /* MWMFirstLaunchController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFirstLaunchController.h; sourceTree = "<group>"; }; - 34A759BA1DC795140078C3AE /* MWMFirstLaunchController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFirstLaunchController.mm; sourceTree = "<group>"; }; - 34A759BB1DC795140078C3AE /* MWMWelcomeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMWelcomeController.h; sourceTree = "<group>"; }; - 34A759BC1DC795140078C3AE /* MWMWelcomeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMWelcomeController.mm; sourceTree = "<group>"; }; - 34A759D11DC7953A0078C3AE /* Welcome.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Welcome.storyboard; sourceTree = "<group>"; }; 34AB39BF1D2BD8310021857D /* MWMStopButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMStopButton.h; sourceTree = "<group>"; }; 34AB39C01D2BD8310021857D /* MWMStopButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMStopButton.mm; sourceTree = "<group>"; }; 34ABA6141C2D185B00FE1BEC /* MWMAuthorizationOSMLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAuthorizationOSMLoginViewController.h; sourceTree = "<group>"; }; @@ -1599,6 +1604,9 @@ 34D15BA51BD8F93C00C8BCBE /* AddSetTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddSetTableViewCell.h; sourceTree = "<group>"; }; 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AddSetTableViewCell.mm; sourceTree = "<group>"; }; 34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddSetTableViewCell.xib; sourceTree = "<group>"; }; + 34D4FA591E2642FB003F53EF /* Storyboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = "<group>"; }; + 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstLaunchController.swift; sourceTree = "<group>"; }; + 34D4FA651E265749003F53EF /* WhatsNewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhatsNewController.swift; sourceTree = "<group>"; }; 34F73F601E082FF700AC1FD6 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 34F73F621E082FF800AC1FD6 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = "<group>"; }; 34F73F631E082FF800AC1FD6 /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/InfoPlist.strings; sourceTree = "<group>"; }; @@ -1724,8 +1732,6 @@ 849CF7A31DE842290024A8A5 /* cmMAPS.ME.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = cmMAPS.ME.app; path = "cm dbg.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 8D1107310486CEB800E47090 /* MAPSME.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MAPSME.plist; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; 972CDCC51887F1B7006641CA /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; - 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = LocalNotificationManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 974D041C1977DE430081D0A7 /* LocalNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalNotificationManager.h; sourceTree = "<group>"; }; 97719D441843B6DC00BDD815 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; 97719D471843B6F200BDD815 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 978D4A30199A11E600D72CA7 /* faq.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = faq.html; path = ../../data/faq.html; sourceTree = "<group>"; }; @@ -2346,7 +2352,6 @@ 458287C21AD3BE2000BA8940 /* DownloadIndicatorProtocol.h */, 46F26CD610F623BA00ECCA39 /* EAGLView.h */, 46F26CD710F623BA00ECCA39 /* EAGLView.mm */, - 34479C741C60C6130065D261 /* Framework */, 34ABA61D1C2D514A00FE1BEC /* Input Validators */, 340475791E081B3300C92850 /* iosOGLContext.h */, 3404757A1E081B3300C92850 /* iosOGLContext.mm */, @@ -2354,8 +2359,6 @@ 3404757C1E081B3300C92850 /* iosOGLContextFactory.mm */, F6DF5F321CD1136800A87154 /* LocaleTranslator.h */, F6381BF41CD12045004CA943 /* LocaleTranslator.mm */, - 974D041C1977DE430081D0A7 /* LocalNotificationManager.h */, - 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */, 1D3623240D0F684500981E51 /* MapsAppDelegate.h */, 1D3623250D0F684500981E51 /* MapsAppDelegate.mm */, F613FA741AB330AF002394D4 /* MapViewController */, @@ -2566,8 +2569,10 @@ 340475281E081A4600C92850 /* Core */ = { isa = PBXGroup; children = ( + 3486B50F1E27AD3B0069C126 /* Framework */, 340475291E081A4600C92850 /* Location */, 340475301E081A4600C92850 /* NetworkPolicy */, + 3486B5041E27A4B50069C126 /* Notifications */, 340475331E081A4600C92850 /* Routing */, 340475391E081A4600C92850 /* Search */, 3404753F1E081A4600C92850 /* Settings */, @@ -2586,6 +2591,7 @@ 3404752D1E081A4600C92850 /* MWMLocationObserver.h */, 3404752E1E081A4600C92850 /* MWMLocationPredictor.h */, 3404752F1E081A4600C92850 /* MWMLocationPredictor.mm */, + 3486B5031E27948F0069C126 /* MWMMyPositionMode.h */, ); path = Location; sourceTree = "<group>"; @@ -2664,18 +2670,6 @@ path = Share; sourceTree = "<group>"; }; - 34479C741C60C6130065D261 /* Framework */ = { - isa = PBXGroup; - children = ( - 34479C761C60C6130065D261 /* Framework.h */, - 34479C751C60C6130065D261 /* Framework.cpp */, - 34479C771C60C6130065D261 /* MWMFrameworkListener.h */, - 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */, - 34479C791C60C6130065D261 /* MWMFrameworkObservers.h */, - ); - path = Framework; - sourceTree = "<group>"; - }; 3454D7981E07F045004AF2AD /* Categories */ = { isa = PBXGroup; children = ( @@ -2831,6 +2825,43 @@ path = Components; sourceTree = "<group>"; }; + 3486B5041E27A4B50069C126 /* Notifications */ = { + isa = PBXGroup; + children = ( + 3486B5051E27A4B50069C126 /* LocalNotificationManager.h */, + 3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */, + 3486B50A1E27A4C50069C126 /* MWMPushNotifications.h */, + 3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */, + ); + path = Notifications; + sourceTree = "<group>"; + }; + 3486B50F1E27AD3B0069C126 /* Framework */ = { + isa = PBXGroup; + children = ( + 3486B5101E27AD3B0069C126 /* Framework.cpp */, + 3486B5111E27AD3B0069C126 /* Framework.h */, + 3486B5121E27AD3B0069C126 /* MWMFrameworkListener.h */, + 3486B5131E27AD3B0069C126 /* MWMFrameworkListener.mm */, + 3486B5141E27AD3B0069C126 /* MWMFrameworkObservers.h */, + 3486B51B1E27AD590069C126 /* MWMFrameworkHelper.h */, + 3486B51C1E27AD590069C126 /* MWMFrameworkHelper.mm */, + ); + path = Framework; + sourceTree = "<group>"; + }; + 34943BB01E2620C600B14F84 /* Welcome */ = { + isa = PBXGroup; + children = ( + 34943BB11E2620C600B14F84 /* Welcome.storyboard */, + 34943BB51E26222300B14F84 /* WelcomeProtocol.swift */, + 34943BB91E2626B200B14F84 /* WelcomePageController.swift */, + 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */, + 34D4FA651E265749003F53EF /* WhatsNewController.swift */, + ); + path = Welcome; + sourceTree = "<group>"; + }; 3497A9321B5CF8A900F51E55 /* NavigationDashboard */ = { isa = PBXGroup; children = ( @@ -2939,7 +2970,6 @@ 34BC72091B0DECAE0012A34B /* MapViewControls */ = { isa = PBXGroup; children = ( - F681DE941BFB38D700B547C7 /* Welcome */, 3465E7D51B66589900854C4D /* APIBar */, 340537621BBED98600D452C6 /* MWMMapViewControlsCommon.h */, 34BC72101B0DECAE0012A34B /* MWMMapViewControlsManager.h */, @@ -2953,18 +2983,6 @@ path = CustomViews/MapViewControls; sourceTree = "<group>"; }; - 34CD81C91C92A884007D2A60 /* PageController */ = { - isa = PBXGroup; - children = ( - 34A759B31DC795090078C3AE /* MWMPageController.h */, - 34A759B41DC795090078C3AE /* MWMPageController.mm */, - 34A759B51DC795090078C3AE /* MWMPageControllerDataSource.h */, - 34A759B61DC795090078C3AE /* MWMPageControllerDataSource.mm */, - ); - name = PageController; - path = Welcome/PageController; - sourceTree = "<group>"; - }; 34D783C71B5F9D7800E0C0EE /* Views */ = { isa = PBXGroup; children = ( @@ -3194,21 +3212,6 @@ name = TextView; sourceTree = "<group>"; }; - F681DE941BFB38D700B547C7 /* Welcome */ = { - isa = PBXGroup; - children = ( - 34CD81C91C92A884007D2A60 /* PageController */, - 34A759D11DC7953A0078C3AE /* Welcome.storyboard */, - 34A759B91DC795140078C3AE /* MWMFirstLaunchController.h */, - 34A759BA1DC795140078C3AE /* MWMFirstLaunchController.mm */, - 34A759BB1DC795140078C3AE /* MWMWelcomeController.h */, - 34A759BC1DC795140078C3AE /* MWMWelcomeController.mm */, - 341966841E000CDD00F96327 /* MWMWhatsNewTrafficController.h */, - 341966851E000CDD00F96327 /* MWMWhatsNewTrafficController.mm */, - ); - path = Welcome; - sourceTree = "<group>"; - }; F6BBF2C31B4FFB56000CF8E2 /* LocationAlert */ = { isa = PBXGroup; children = ( @@ -3251,6 +3254,8 @@ F6E2FC8F1E097B9F0083EBEC /* PlacePage */, F6E2FCE11E097B9F0083EBEC /* Search */, F6E2FD361E097BA00083EBEC /* Settings */, + 34D4FA591E2642FB003F53EF /* Storyboard.swift */, + 34943BB01E2620C600B14F84 /* Welcome */, ); path = UI; sourceTree = "<group>"; @@ -4104,6 +4109,7 @@ F6FE3C3B1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib in Resources */, 34B7D4E11DE5903E00BE2309 /* Authorization.storyboard in Resources */, 5605022F1B6211E100169CAD /* sound-strings in Resources */, + 34943BB21E2620C600B14F84 /* Welcome.storyboard in Resources */, 452FCA3B1B6A3DF7007019AB /* colors.txt in Resources */, EE026F0611D6AC0D00645242 /* classificator.txt in Resources */, F6E2FD6D1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */, @@ -4118,7 +4124,6 @@ F68FCB8C1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */, F6E2FD581E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */, 4A23D15F1B8B4DD700D4EB6F /* resources-xxhdpi_clear in Resources */, - 34A759D21DC7953A0078C3AE /* Welcome.storyboard in Resources */, F64F199E1AB81A00006EAF7E /* MWMDefaultAlert.xib in Resources */, F6E2FDB21E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, F6E2FE0C1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */, @@ -4274,6 +4279,7 @@ F6E2FE0D1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */, F6E2FF421E097BA00083EBEC /* MWMSearchTableViewController.xib in Resources */, F6E2FDE61E097BA00083EBEC /* MWMNoteCell.xib in Resources */, + 34943BB31E2620C600B14F84 /* Welcome.storyboard in Resources */, 6741A94B1BF340DE002C974C /* unicode_blocks.txt in Resources */, 6741A94C1BF340DE002C974C /* fonts_blacklist.txt in Resources */, F6E2FF2A1E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */, @@ -4324,7 +4330,6 @@ 6741A95C1BF340DE002C974C /* categories.txt in Resources */, 6741A95D1BF340DE002C974C /* types.txt in Resources */, F6E2FF1B1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */, - 34A759DB1DC797830078C3AE /* Welcome.storyboard in Resources */, F6E2FE8E1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */, F6E2FDFB1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */, 6741A9601BF340DE002C974C /* MWMRoutingDisclaimerAlert.xib in Resources */, @@ -4443,7 +4448,7 @@ F6E2FDB11E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, F6E2FDC01E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, F6E2FEA71E097BA00083EBEC /* MWMPPView.xib in Resources */, - 849CF5FD1DE842290024A8A5 /* Welcome.storyboard in Resources */, + 34943BB41E2620C600B14F84 /* Welcome.storyboard in Resources */, F6E2FEB31E097BA00083EBEC /* _MWMPPPSchedule.xib in Resources */, F6E2FF341E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */, 849CF5FE1DE842290024A8A5 /* MWMDefaultAlert.xib in Resources */, @@ -4646,6 +4651,7 @@ files = ( 34845DB61E166084003D55B9 /* Common.swift in Sources */, 1D60589B0D05DD56006BFB54 /* main.mm in Sources */, + 34D4FA5A1E2642FB003F53EF /* Storyboard.swift in Sources */, 340837161B72451A00B5C185 /* MWMShareActivityItem.mm in Sources */, F6E2FF0B1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCD1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -4668,11 +4674,14 @@ 34F742311E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 340475801E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 349C26B51BB02C6F0005DF2F /* MWMBottomMenuViewController.mm in Sources */, + 3486B51D1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, F6E2FE481E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 3404754F1E081A4600C92850 /* fabric_logging_ios.mm in Sources */, 34ABA6281C2D567B00FE1BEC /* MWMInputLoginValidator.mm in Sources */, 560634F21B78806100F3D670 /* MWMTextToSpeech.mm in Sources */, F6E2FECF1E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, + 34D4FA661E265749003F53EF /* WhatsNewController.swift in Sources */, + 3486B5151E27AD3B0069C126 /* Framework.cpp in Sources */, 3454D7D01E07F045004AF2AD /* UIImage+RGBAData.mm in Sources */, F6E2FF081E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD8E1E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, @@ -4685,7 +4694,6 @@ F6E2FD791E097BA00083EBEC /* MWMMapDownloaderDefaultDataSource.mm in Sources */, F6E2FF3E1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */, F6E2FDAC1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, - 34A759B81DC795090078C3AE /* MWMPageControllerDataSource.mm in Sources */, F6E2FDDF1E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, F6BB6CC61BB18C0900DF1DF2 /* MWMRoutePointCell.m in Sources */, F6E2FDB51E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -4703,7 +4711,6 @@ 340475611E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, 342EE4111C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, F6E2FEE41E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, - 34479C7C1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */, F6E2FF621E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, F64D9C9F1C899C350063FA30 /* MWMEditorViralAlert.mm in Sources */, 34ABA62C1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */, @@ -4726,6 +4733,7 @@ 34C9BD021C6DB693000DC38D /* MWMTableViewController.mm in Sources */, F6E2FDFD1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDB1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, + 34943BB61E26222300B14F84 /* WelcomeProtocol.swift in Sources */, F6E2FDC11E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, F6E2FD5E1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF471E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, @@ -4736,7 +4744,6 @@ F6E2FE301E097BA00083EBEC /* MWMStreetEditorViewController.mm in Sources */, F6E2FE3F1E097BA00083EBEC /* MWMPlacePageEntity.mm in Sources */, F6E2FE271E097BA00083EBEC /* MWMOpeningHoursSection.mm in Sources */, - 34DCDE3A1C75CD8100652CAC /* Framework.cpp in Sources */, F6E2FE241E097BA00083EBEC /* MWMOpeningHoursModel.mm in Sources */, F6BD33811B62403B00F2CE18 /* MWMRoutePreview.mm in Sources */, F6E2FD8B1E097BA00083EBEC /* MWMNoMapsView.mm in Sources */, @@ -4750,6 +4757,7 @@ 3462258E1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */, F6E2FEBD1E097BA00083EBEC /* MWMPPPreviewLayoutHelper.mm in Sources */, 3454D7DF1E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */, + 3486B50C1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, F6E2FEF91E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE421E097BA00083EBEC /* MWMDirectionView.mm in Sources */, F6E2FDE21E097BA00083EBEC /* MWMNoteCell.mm in Sources */, @@ -4802,10 +4810,10 @@ F6E2FE661E097BA00083EBEC /* MWMPlacePageButtonCell.mm in Sources */, F6E2FE121E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 340837131B7243CE00B5C185 /* MWMActivityViewController.mm in Sources */, + 3486B5181E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */, 3404756A1E081A4600C92850 /* MWMSearch+CoreSpotlight.mm in Sources */, F653CE111C6DEB5A00A453F1 /* MWMDropDown.mm in Sources */, 3404755B1E081A4600C92850 /* MWMLocationManager.mm in Sources */, - 34A759B71DC795090078C3AE /* MWMPageController.mm in Sources */, 3454D7BB1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */, F6E2FF4D1E097BA00083EBEC /* MWMAboutController.mm in Sources */, 3497A93A1B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm in Sources */, @@ -4817,10 +4825,8 @@ F6E2FDBB1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, F6E2FF4A1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, F6E2FE781E097BA00083EBEC /* MWMOpeningHoursLayoutHelper.mm in Sources */, - 34A759C91DC795140078C3AE /* MWMFirstLaunchController.mm in Sources */, F6BD1D201CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, F6B97B261CD0CA990009B612 /* MWMBookmarkNameCell.mm in Sources */, - 974D041D1977DE430081D0A7 /* LocalNotificationManager.mm in Sources */, F6E2FD7C1E097BA00083EBEC /* MWMMapDownloaderExtendedDataSource.mm in Sources */, F6E2FED21E097BA00083EBEC /* MWMSearchHotelsFilterViewController.mm in Sources */, 34ABA6201C2D517500FE1BEC /* MWMInputValidator.mm in Sources */, @@ -4833,17 +4839,19 @@ 340475731E081A4600C92850 /* MWMStorage.mm in Sources */, F6E2FD851E097BA00083EBEC /* MWMBaseMapDownloaderViewController.mm in Sources */, 34ABA6241C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */, + 34943BBA1E2626B200B14F84 /* WelcomePageController.swift in Sources */, F6E2FEE11E097BA00083EBEC /* MWMSearchManager.mm in Sources */, F6E2FE211E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */, - 341966861E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */, F6E2FD911E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, F6F7787A1DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm in Sources */, F6E2FDA31E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, F6E2FDD31E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 346EDADB1B9F0E35004F8DB5 /* MWMMultilineLabel.mm in Sources */, + 34D4FA621E26572D003F53EF /* FirstLaunchController.swift in Sources */, 34C9BD041C6DB693000DC38D /* MWMViewController.mm in Sources */, 340475701E081A4600C92850 /* MWMSettings.mm in Sources */, 3404756D1E081A4600C92850 /* MWMSearch.mm in Sources */, + 3486B5071E27A4B50069C126 /* LocalNotificationManager.mm in Sources */, F6E2FEFC1E097BA00083EBEC /* MWMSearchCategoryCell.mm in Sources */, 3454D7CA1E07F045004AF2AD /* UIColor+MapsMeColor.mm in Sources */, 3454D7BE1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, @@ -4880,7 +4888,6 @@ F6E2FD9D1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, F6E2FE091E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 3454D7E21E07F045004AF2AD /* UITextView+RuntimeAttributes.mm in Sources */, - 34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */, 34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */, F6E2FED51E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */, F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */, @@ -4894,6 +4901,7 @@ files = ( 34845DB71E166084003D55B9 /* Common.swift in Sources */, 6741A9A31BF340DE002C974C /* main.mm in Sources */, + 34D4FA5B1E2642FB003F53EF /* Storyboard.swift in Sources */, F67E751E1DB76DFC00D6741F /* MWMTaxiCollectionLayout.mm in Sources */, F6E2FF0C1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCE1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -4909,7 +4917,6 @@ F6E2FEC11E097BA00083EBEC /* MWMConsole.mm in Sources */, 3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */, F6E2FDF81E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */, - 34A759DA1DC797790078C3AE /* MWMFirstLaunchController.mm in Sources */, F6E2FE191E097BA00083EBEC /* MWMOpeningHoursTimeSpanTableViewCell.mm in Sources */, F6E2FDEC1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */, F6E2FE101E097BA00083EBEC /* MWMOpeningHoursTableViewCell.mm in Sources */, @@ -4917,11 +4924,14 @@ 34F742321E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 340475811E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 6741A9B11BF340DE002C974C /* MWMAPIBarView.mm in Sources */, + 3486B51E1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, F6E2FE491E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 6741A9B31BF340DE002C974C /* MWMBottomMenuViewController.mm in Sources */, 340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */, 6741A9B61BF340DE002C974C /* MWMTextToSpeech.mm in Sources */, F6E2FED01E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, + 34D4FA671E265749003F53EF /* WhatsNewController.swift in Sources */, + 3486B5161E27AD3B0069C126 /* Framework.cpp in Sources */, 34ABA6291C2D567B00FE1BEC /* MWMInputLoginValidator.mm in Sources */, F6E2FF091E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD8F1E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, @@ -4943,7 +4953,6 @@ 340475681E081A4600C92850 /* MWMRouterSavedState.mm in Sources */, F6E2FF2D1E097BA00083EBEC /* MWMSearchCell.mm in Sources */, 3454D7C51E07F045004AF2AD /* UIButton+Orientation.mm in Sources */, - 34A759DC1DC797880078C3AE /* MWMWelcomeController.mm in Sources */, 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */, F6E2FE4C1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, @@ -4953,7 +4962,6 @@ F6E2FEE51E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, F6E2FF631E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, 342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, - 34479C7D1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */, F6E2FEF71E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */, 34845DAF1E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */, F6791B141C43DF0B007A8A6E /* MWMStartButton.mm in Sources */, @@ -4974,6 +4982,7 @@ F6E2FDFE1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDC1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, F6E2FDC21E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, + 34943BB71E26222300B14F84 /* WelcomeProtocol.swift in Sources */, F6E2FD5F1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, F6E2FF271E097BA00083EBEC /* MWMSearchTabButtonsView.mm in Sources */, @@ -4994,12 +5003,12 @@ 340475531E081A4600C92850 /* MWMCustomFacebookEvents.mm in Sources */, 34BF0CC71C31304A00D097EB /* MWMAuthorizationCommon.mm in Sources */, F6E2FD771E097BA00083EBEC /* MWMMapDownloaderDataSource.mm in Sources */, - 34A759E41DC797CE0078C3AE /* MWMPageControllerDataSource.mm in Sources */, 6741A9E01BF340DE002C974C /* MWMDownloaderDialogHeader.mm in Sources */, F6E2FEBE1E097BA00083EBEC /* MWMPPPreviewLayoutHelper.mm in Sources */, 3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */, F6E2FEFA1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE431E097BA00083EBEC /* MWMDirectionView.mm in Sources */, + 3486B50D1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, F6E2FDE31E097BA00083EBEC /* MWMNoteCell.mm in Sources */, F6E2FD561E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */, 3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */, @@ -5051,6 +5060,7 @@ F6E2FE671E097BA00083EBEC /* MWMPlacePageButtonCell.mm in Sources */, F6E2FE131E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, F626D52F1C3E83F800C17D15 /* MWMTableViewCell.mm in Sources */, + 3486B5191E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */, 3404756B1E081A4600C92850 /* MWMSearch+CoreSpotlight.mm in Sources */, F653CE121C6DEC8E00A453F1 /* MWMDropDown.mm in Sources */, 3404755C1E081A4600C92850 /* MWMLocationManager.mm in Sources */, @@ -5059,7 +5069,6 @@ F6E2FF4E1E097BA00083EBEC /* MWMAboutController.mm in Sources */, 6741AA0A1BF340DE002C974C /* MWMBottomMenuCollectionViewCell.mm in Sources */, 6741AA0B1BF340DE002C974C /* MWMMapViewControlsManager.mm in Sources */, - 6741AA0D1BF340DE002C974C /* LocalNotificationManager.mm in Sources */, F6E2FED91E097BA00083EBEC /* MWMSearchContentView.mm in Sources */, F6E2FD891E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */, F6BD1D211CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, @@ -5079,9 +5088,9 @@ F6E2FEC41E097BA00083EBEC /* MWMSearchFilterPresentationController.mm in Sources */, 34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */, F6E2FD861E097BA00083EBEC /* MWMBaseMapDownloaderViewController.mm in Sources */, - 341966871E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */, F6E2FEE21E097BA00083EBEC /* MWMSearchManager.mm in Sources */, F6E2FE221E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */, + 34943BBB1E2626B200B14F84 /* WelcomePageController.swift in Sources */, 6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */, F6E2FD921E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, 34C9BD051C6DB693000DC38D /* MWMViewController.mm in Sources */, @@ -5089,9 +5098,11 @@ F6E2FDD41E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 3454D7CB1E07F045004AF2AD /* UIColor+MapsMeColor.mm in Sources */, 340475711E081A4600C92850 /* MWMSettings.mm in Sources */, + 34D4FA631E26572D003F53EF /* FirstLaunchController.swift in Sources */, 3404756E1E081A4600C92850 /* MWMSearch.mm in Sources */, 6741AA191BF340DE002C974C /* MWMDownloaderDialogCell.mm in Sources */, F6E2FEFD1E097BA00083EBEC /* MWMSearchCategoryCell.mm in Sources */, + 3486B5081E27A4B50069C126 /* LocalNotificationManager.mm in Sources */, 3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.mm in Sources */, F6E2FE971E097BA00083EBEC /* ContextViews.mm in Sources */, @@ -5122,7 +5133,6 @@ 6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */, 6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */, F6E2FEEB1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */, - 56D545631C74A41900E3719C /* Framework.cpp in Sources */, F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, F6E2FD9E1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, F6E2FE0A1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, @@ -5132,7 +5142,6 @@ F6E2FED61E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */, 6741AA2D1BF340DE002C974C /* AddSetTableViewCell.mm in Sources */, 34845DB31E165E24003D55B9 /* SearchNoResultsViewController.swift in Sources */, - 34A759E31DC797CB0078C3AE /* MWMPageController.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5142,6 +5151,7 @@ files = ( 34845DB81E166084003D55B9 /* Common.swift in Sources */, 849CF6821DE842290024A8A5 /* main.mm in Sources */, + 34D4FA5C1E2642FB003F53EF /* Storyboard.swift in Sources */, 3454D7D51E07F045004AF2AD /* UIImageView+Coloring.mm in Sources */, F6E2FF0D1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCF1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -5164,11 +5174,14 @@ 34F742331E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 849CF6911DE842290024A8A5 /* MWMSideButtons.mm in Sources */, 849CF6971DE842290024A8A5 /* MapsAppDelegate.mm in Sources */, + 3486B51F1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, F6E2FE4A1E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 849CF6981DE842290024A8A5 /* MWMAPIBarView.mm in Sources */, 849CF6991DE842290024A8A5 /* MWMBottomMenuViewController.mm in Sources */, 849CF69D1DE842290024A8A5 /* MWMInputLoginValidator.mm in Sources */, F6E2FED11E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, + 34D4FA681E265749003F53EF /* WhatsNewController.swift in Sources */, + 3486B5171E27AD3B0069C126 /* Framework.cpp in Sources */, 849CF69E1DE842290024A8A5 /* MWMTextToSpeech.mm in Sources */, F6E2FF0A1E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD901E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, @@ -5183,7 +5196,6 @@ F6E2FDAE1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, 849CF6A41DE842290024A8A5 /* MWMRateAlert.mm in Sources */, F6E2FDE11E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, - 849CF6A51DE842290024A8A5 /* MWMPageControllerDataSource.mm in Sources */, F6E2FDB71E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */, F6E2FDC91E097BA00083EBEC /* MWMEditorNotesFooter.mm in Sources */, 849CF6A71DE842290024A8A5 /* MWMRoutePointCell.m in Sources */, @@ -5201,7 +5213,6 @@ F6E2FEE61E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, 849CF6BD1DE842290024A8A5 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, F6E2FF641E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, - 849CF6BF1DE842290024A8A5 /* MWMFrameworkListener.mm in Sources */, 849CF6C31DE842290024A8A5 /* MWMEditorViralAlert.mm in Sources */, F6E2FEF81E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */, 34845DB01E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */, @@ -5222,6 +5233,7 @@ 849CF6D21DE842290024A8A5 /* MWMNavigationController.mm in Sources */, F6E2FDFF1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDD1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, + 34943BB81E26222300B14F84 /* WelcomeProtocol.swift in Sources */, F6E2FDC31E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, F6E2FD601E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF491E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, @@ -5237,7 +5249,6 @@ 849CF6D51DE842290024A8A5 /* MWMTableViewController.mm in Sources */, F6E2FD8D1E097BA00083EBEC /* MWMNoMapsView.mm in Sources */, 849CF6D81DE842290024A8A5 /* MWMSegue.mm in Sources */, - 849CF6D91DE842290024A8A5 /* Framework.cpp in Sources */, F6E2FD721E097BA00083EBEC /* MWMMapDownloaderTableViewCell.mm in Sources */, F6E2FE501E097BA00083EBEC /* MWMActionBarButton.mm in Sources */, 849CF6DC1DE842290024A8A5 /* MWMRoutePreview.mm in Sources */, @@ -5246,6 +5257,7 @@ 849CF6DF1DE842290024A8A5 /* MWMAuthorizationCommon.mm in Sources */, F6E2FEBF1E097BA00083EBEC /* MWMPPPreviewLayoutHelper.mm in Sources */, 3454D7CF1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */, + 3486B50E1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, F6E2FEFB1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE441E097BA00083EBEC /* MWMDirectionView.mm in Sources */, F6E2FDE41E097BA00083EBEC /* MWMNoteCell.mm in Sources */, @@ -5298,11 +5310,11 @@ F6E2FE681E097BA00083EBEC /* MWMPlacePageButtonCell.mm in Sources */, F6E2FE141E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 849CF7151DE842290024A8A5 /* MWMInputEmailValidator.mm in Sources */, + 3486B51A1E27AD3B0069C126 /* MWMFrameworkListener.mm in Sources */, 845E4B1D1DEC83AE00D6BED8 /* MWMMobileInternetAlert.mm in Sources */, 849CF7171DE842290024A8A5 /* BookmarksRootVC.mm in Sources */, 849CF7191DE842290024A8A5 /* MWMActivityViewController.mm in Sources */, 849CF71A1DE842290024A8A5 /* MWMDropDown.mm in Sources */, - 849CF71C1DE842290024A8A5 /* MWMPageController.mm in Sources */, F6E2FF4F1E097BA00083EBEC /* MWMAboutController.mm in Sources */, 3400AB3A1E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */, 849CF71D1DE842290024A8A5 /* MWMNavigationDashboardManager.mm in Sources */, @@ -5315,7 +5327,6 @@ F6E2FE7A1E097BA00083EBEC /* MWMOpeningHoursLayoutHelper.mm in Sources */, 849CF7221DE842290024A8A5 /* MWMBottomMenuCollectionViewCell.mm in Sources */, 849CF7251DE842290024A8A5 /* MWMMapViewControlsManager.mm in Sources */, - 849CF7271DE842290024A8A5 /* MWMFirstLaunchController.mm in Sources */, 849CF7281DE842290024A8A5 /* MWMOsmAuthAlert.mm in Sources */, F6E2FD7E1E097BA00083EBEC /* MWMMapDownloaderExtendedDataSource.mm in Sources */, F6E2FED41E097BA00083EBEC /* MWMSearchHotelsFilterViewController.mm in Sources */, @@ -5326,10 +5337,9 @@ F6E2FF311E097BA00083EBEC /* MWMSearchCommonCell.mm in Sources */, F6E2FEA11E097BA00083EBEC /* MWMPlacePageLayout.mm in Sources */, F6E2FEC51E097BA00083EBEC /* MWMSearchFilterPresentationController.mm in Sources */, - 849CF72C1DE842290024A8A5 /* LocalNotificationManager.mm in Sources */, F6E2FD871E097BA00083EBEC /* MWMBaseMapDownloaderViewController.mm in Sources */, - 341966881E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */, F6E2FEE31E097BA00083EBEC /* MWMSearchManager.mm in Sources */, + 34943BBC1E2626B200B14F84 /* WelcomePageController.swift in Sources */, F6E2FE231E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */, 849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */, F6E2FD931E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, @@ -5337,9 +5347,11 @@ F6E2FDA51E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, F6E2FDD51E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 3454D7C31E07F045004AF2AD /* NSString+Categories.mm in Sources */, + 34D4FA641E26572D003F53EF /* FirstLaunchController.swift in Sources */, 849CF7371DE842290024A8A5 /* MWMTaxiCollectionLayout.mm in Sources */, 3454D7C61E07F045004AF2AD /* UIButton+Orientation.mm in Sources */, 340475571E081A4600C92850 /* Statistics.mm in Sources */, + 3486B5091E27A4B50069C126 /* LocalNotificationManager.mm in Sources */, F6E2FEFE1E097BA00083EBEC /* MWMSearchCategoryCell.mm in Sources */, 3404754B1E081A4600C92850 /* AppInfo.mm in Sources */, 849CF73C1DE842290024A8A5 /* MWMMultilineLabel.mm in Sources */, @@ -5376,7 +5388,6 @@ F6E2FD9F1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, F6E2FE0B1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */, - 849CF76C1DE842290024A8A5 /* MWMWelcomeController.mm in Sources */, 849CF76D1DE842290024A8A5 /* AddSetTableViewCell.mm in Sources */, F6E2FED71E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */, 849CF76E1DE842290024A8A5 /* MWMEditorViralActivityItem.mm in Sources */, diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSource.mm b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSource.mm index fa95ce0ec3..b83f5d826f 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSource.mm +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSource.mm @@ -1,6 +1,7 @@ -#import "MapsAppDelegate.h" -#import "MWMLocationManager.h" #import "MWMMapDownloaderExtendedDataSource.h" +#import "CLLocation+Mercator.h" +#import "MWMLocationManager.h" +#import "MapsAppDelegate.h" #include "Framework.h" diff --git a/iphone/Maps/UI/Downloader/NoMaps/DownloaderNoResultsEmbedViewController.swift b/iphone/Maps/UI/Downloader/NoMaps/DownloaderNoResultsEmbedViewController.swift index 6137be47db..2c2b7919cd 100644 --- a/iphone/Maps/UI/Downloader/NoMaps/DownloaderNoResultsEmbedViewController.swift +++ b/iphone/Maps/UI/Downloader/NoMaps/DownloaderNoResultsEmbedViewController.swift @@ -8,7 +8,6 @@ final class DownloaderNoResultsEmbed: UINavigationController { case noMaps case noSearchResults - } var screen = Screen.noMaps { @@ -21,5 +20,4 @@ final class DownloaderNoResultsEmbed: UINavigationController { setViewControllers([controller], animated: false) } } - } diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm index 20bf307283..b42275b9c2 100644 --- a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm +++ b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm @@ -1,5 +1,6 @@ #import "MWMPlacePageManager.h" #import <Pushwoosh/PushNotificationManager.h> +#import "CLLocation+Mercator.h" #import "MWMAPIBar.h" #import "MWMActivityViewController.h" #import "MWMCircularProgress.h" @@ -7,6 +8,7 @@ #import "MWMFrameworkListener.h" #import "MWMFrameworkObservers.h" #import "MWMLocationManager.h" +#import "MWMLocationObserver.h" #import "MWMPlacePageData.h" #import "MWMPlacePageLayout.h" #import "MWMRouter.h" diff --git a/iphone/Maps/UI/Search/MWMSearchManager.mm b/iphone/Maps/UI/Search/MWMSearchManager.mm index 197ee3f3e3..caa3c6eba9 100644 --- a/iphone/Maps/UI/Search/MWMSearchManager.mm +++ b/iphone/Maps/UI/Search/MWMSearchManager.mm @@ -1,4 +1,5 @@ #import "MWMSearchManager.h" +#import "CLLocation+Mercator.h" #import "MWMCommon.h" #import "MWMConsole.h" #import "MWMFrameworkListener.h" diff --git a/iphone/Maps/UI/Search/SearchNoResultsViewController.swift b/iphone/Maps/UI/Search/SearchNoResultsViewController.swift index 04c93a66da..fe33f774fc 100644 --- a/iphone/Maps/UI/Search/SearchNoResultsViewController.swift +++ b/iphone/Maps/UI/Search/SearchNoResultsViewController.swift @@ -20,7 +20,6 @@ final class SearchNoResultsViewController: MWMViewController { MWMKeyboard.add(self) onKeyboardAnimation() } - } extension SearchNoResultsViewController: MWMKeyboardObserver { @@ -29,5 +28,4 @@ extension SearchNoResultsViewController: MWMKeyboardObserver { containerBottomOffset.constant = MWMKeyboard.keyboardHeight() view.layoutIfNeeded() } - } diff --git a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm index c2066a15b3..a5e450438f 100644 --- a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm +++ b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm @@ -1,6 +1,7 @@ +#import "MWMSearchCommonCell.h" +#import "CLLocation+Mercator.h" #import "MWMCommon.h" #import "MWMLocationManager.h" -#import "MWMSearchCommonCell.h" #import "MapsAppDelegate.h" #include "Framework.h" diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift index 2ca6547bec..3ad55e6f34 100644 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift +++ b/iphone/Maps/UI/Settings/Cells/SettingsTableViewLinkCell.swift @@ -23,5 +23,4 @@ info.textColor = UIColor.blackSecondaryText() info.font = UIFont.regular17() } - } diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift index d5df003c07..654dfdf1bb 100644 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift +++ b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSelectableCell.swift @@ -13,5 +13,4 @@ title.textColor = UIColor.blackPrimaryText() title.font = UIFont.regular17() } - } diff --git a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift index 0335f2d8d9..a3c1f1e9de 100644 --- a/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift +++ b/iphone/Maps/UI/Settings/Cells/SettingsTableViewSwitchCell.swift @@ -1,7 +1,6 @@ @objc protocol SettingsTableViewSwitchCellDelegate { func switchCell(_ cell: SettingsTableViewSwitchCell, didChangeValue value: Bool) - } @objc final class SettingsTableViewSwitchCell: MWMTableViewCell { @@ -39,5 +38,4 @@ fileprivate func styleSwitchButton() { switchButton.onTintColor = UIColor.linkBlue() } - } diff --git a/iphone/Maps/UI/Storyboard.swift b/iphone/Maps/UI/Storyboard.swift new file mode 100644 index 0000000000..dad3d4bce5 --- /dev/null +++ b/iphone/Maps/UI/Storyboard.swift @@ -0,0 +1,16 @@ +import UIKit + +enum Storyboard { + + case LaunchScreen + case Mapsme + case Welcome + + var instance: UIStoryboard { + switch self { + case .LaunchScreen: return UIStoryboard(name: "LaunchScreen", bundle: Bundle.main) + case .Mapsme: return UIStoryboard(name: "Mapsme", bundle: Bundle.main) + case .Welcome: return UIStoryboard(name: "Welcome", bundle: Bundle.main) + } + } +} diff --git a/iphone/Maps/UI/Welcome/FirstLaunchController.swift b/iphone/Maps/UI/Welcome/FirstLaunchController.swift new file mode 100644 index 0000000000..cf4a5744b7 --- /dev/null +++ b/iphone/Maps/UI/Welcome/FirstLaunchController.swift @@ -0,0 +1,75 @@ +import UIKit + +final class FirstLaunchController: MWMViewController, WelcomeProtocol { + + typealias ConfigBlock = (FirstLaunchController) -> Void + static var pagesConfigBlocks: [ConfigBlock]! = [{ + $0.setup(image: #imageLiteral(resourceName: "img_onboarding_offline_maps"), + title: L("onboarding_offline_maps_title"), + text: L("onboarding_offline_maps_message"), + buttonTitle: L("whats_new_next_button"), + buttonAction: #selector(nextPage)) + }, { + $0.setup(image: #imageLiteral(resourceName: "img_onboarding_geoposition"), + title: L("onboarding_location_title"), + text: L("onboarding_location_message"), + buttonTitle: L("whats_new_next_button"), + buttonAction: #selector(nextPage)) + }, { + $0.setup(image: #imageLiteral(resourceName: "img_onboarding_notification"), + title: L("onboarding_notifications_title"), + text: L("onboarding_notifications_message"), + buttonTitle: L("whats_new_next_button"), + buttonAction: #selector(nextPage)) + }, { + $0.setup(image: #imageLiteral(resourceName: "img_onboarding_done"), + title: L("first_launch_congrats_title"), + text: L("first_launch_congrats_text"), + buttonTitle: L("done"), + buttonAction: #selector(close)) + }] + + static var key: String { return "\(self)" } + + var pageIndex: Int! + weak var pageController: WelcomePageController! + + @IBOutlet weak var image: UIImageView! + @IBOutlet weak var alertTitle: UILabel! + @IBOutlet weak var alertText: UILabel! + @IBOutlet weak var nextPageButton: UIButton! + @IBOutlet weak var containerWidth: NSLayoutConstraint! + @IBOutlet weak var containerHeight: NSLayoutConstraint! + + @IBOutlet weak var imageMinHeight: NSLayoutConstraint! + @IBOutlet weak var imageHeight: NSLayoutConstraint! + + @IBOutlet weak var titleTopOffset: NSLayoutConstraint! + @IBOutlet weak var titleImageOffset: NSLayoutConstraint! + + override func viewDidLoad() { + super.viewDidLoad() + config() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + updateSize() + if pageIndex == 2 { + MWMLocationManager.start() + } else if pageIndex == 3 { + MWMPushNotifications.setup(nil) + } + } + + @objc + private func nextPage() { + pageController.nextPage() + } + + @objc + private func close() { + pageController.close() + MWMFrameworkHelper.zoomToCurrentPosition() + } +} diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/Welcome.storyboard b/iphone/Maps/UI/Welcome/Welcome.storyboard index 0df830f1f2..d4acb022ac 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Welcome/Welcome.storyboard +++ b/iphone/Maps/UI/Welcome/Welcome.storyboard @@ -16,10 +16,10 @@ </array> </customFonts> <scenes> - <!--Page Controller--> + <!--Welcome Page Controller--> <scene sceneID="1ZX-3C-7bF"> <objects> - <pageViewController storyboardIdentifier="MWMPageScrollController" autoresizesArchivedViewToFullSize="NO" transitionStyle="scroll" navigationOrientation="horizontal" spineLocation="none" id="hqM-da-ko0" customClass="MWMPageController" sceneMemberID="viewController"/> + <pageViewController storyboardIdentifier="WelcomePageScrollController" autoresizesArchivedViewToFullSize="NO" transitionStyle="scroll" navigationOrientation="horizontal" spineLocation="none" id="hqM-da-ko0" customClass="MWMWelcomePageController" sceneMemberID="viewController"/> <placeholder placeholderIdentifier="IBFirstResponder" id="fu9-Ui-e6Z" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1881" y="495"/> @@ -27,7 +27,7 @@ <!--First Launch Controller--> <scene sceneID="AgG-8B-fRd"> <objects> - <viewController storyboardIdentifier="MWMFirstLaunchController" id="Gh3-qE-FWN" customClass="MWMFirstLaunchController" sceneMemberID="viewController"> + <viewController storyboardIdentifier="FirstLaunchController" id="Gh3-qE-FWN" customClass="FirstLaunchController" customModule="cm_beta" customModuleProvider="target" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="hU9-q6-FZ7"/> <viewControllerLayoutGuide type="bottom" id="f75-9I-74y"/> @@ -37,7 +37,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x7d-CC-QbG" userLabel="Container"> - <rect key="frame" x="-72.5" y="33.5" width="520" height="600"/> + <rect key="frame" x="-72.5" y="34" width="520" height="600"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X71-ep-Kwb" userLabel="BoundsView"> <rect key="frame" x="16" y="40" width="488" height="456"/> @@ -46,7 +46,7 @@ <rect key="frame" x="44" y="50" width="400" height="357"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalCompressionResistancePriority="749" image="ic_placeholder" translatesAutoresizingMaskIntoConstraints="NO" id="3yX-3O-NmI"> - <rect key="frame" x="80" y="0.0" width="240" height="240"/> + <rect key="frame" x="80.5" y="0.0" width="240" height="240"/> <constraints> <constraint firstAttribute="height" relation="lessThanOrEqual" priority="800" constant="280" id="0jq-yV-Ew3"/> <constraint firstAttribute="width" secondItem="3yX-3O-NmI" secondAttribute="height" multiplier="1:1" id="OJT-CV-liK"/> @@ -102,7 +102,7 @@ </constraints> </view> <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UqX-Ni-ms1" userLabel="NotNow"> - <rect key="frame" x="140" y="516" width="240" height="44"/> + <rect key="frame" x="140.5" y="516" width="240" height="44"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="240" id="66G-KS-XdJ"/> @@ -151,7 +151,6 @@ <outlet property="alertText" destination="qXz-kN-Ik2" id="TS3-L7-Li9"/> <outlet property="alertTitle" destination="dbU-5I-7cc" id="qzC-fn-IMt"/> <outlet property="containerHeight" destination="AgA-pn-7sz" id="DzS-q5-8dn"/> - <outlet property="containerView" destination="x7d-CC-QbG" id="jM8-lt-c26"/> <outlet property="containerWidth" destination="7CX-xf-4jo" id="raa-SJ-nLD"/> <outlet property="image" destination="3yX-3O-NmI" id="squ-0I-iMH"/> <outlet property="imageHeight" destination="1bZ-xW-y9r" id="r1Z-vV-6Ut"/> @@ -165,18 +164,18 @@ </objects> <point key="canvasLocation" x="2563" y="1224"/> </scene> - <!--Page Controller--> + <!--Welcome Page Controller--> <scene sceneID="yjG-6M-B0J"> <objects> - <pageViewController storyboardIdentifier="MWMPageCurlController" autoresizesArchivedViewToFullSize="NO" transitionStyle="pageCurl" navigationOrientation="horizontal" spineLocation="none" id="Co6-CL-XGB" customClass="MWMPageController" sceneMemberID="viewController"/> + <pageViewController storyboardIdentifier="WelcomePageCurlController" autoresizesArchivedViewToFullSize="NO" transitionStyle="pageCurl" navigationOrientation="horizontal" spineLocation="none" id="Co6-CL-XGB" customClass="MWMWelcomePageController" sceneMemberID="viewController"/> <placeholder placeholderIdentifier="IBFirstResponder" id="QyJ-ER-oPm" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="2563" y="495"/> </scene> - <!--Whats New Traffic Controller--> + <!--Whats New Controller--> <scene sceneID="tit-8N-P9M"> <objects> - <viewController storyboardIdentifier="MWMWhatsNewTrafficController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BOY-Lz-6Ub" customClass="MWMWhatsNewTrafficController" sceneMemberID="viewController"> + <viewController storyboardIdentifier="WhatsNewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BOY-Lz-6Ub" customClass="WhatsNewController" customModule="cm_beta" customModuleProvider="target" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="Jil-y7-mgd"/> <viewControllerLayoutGuide type="bottom" id="XLE-0j-M1L"/> @@ -314,7 +313,6 @@ <outlet property="alertText" destination="Il6-Xw-i2E" id="qUe-5S-cPl"/> <outlet property="alertTitle" destination="3d2-EJ-eSS" id="pCQ-2A-RYQ"/> <outlet property="containerHeight" destination="KlB-Uh-TO0" id="tT3-bC-2mo"/> - <outlet property="containerView" destination="tEi-xZ-vnH" id="tIh-Rr-zMr"/> <outlet property="containerWidth" destination="TOw-Nl-QTj" id="Leb-pa-DoV"/> <outlet property="image" destination="oT6-Mu-189" id="Dyt-KS-AuK"/> <outlet property="imageHeight" destination="b4R-09-WRx" id="vPb-xP-p1f"/> diff --git a/iphone/Maps/UI/Welcome/WelcomePageController.swift b/iphone/Maps/UI/Welcome/WelcomePageController.swift new file mode 100644 index 0000000000..94eed2d04f --- /dev/null +++ b/iphone/Maps/UI/Welcome/WelcomePageController.swift @@ -0,0 +1,137 @@ +import UIKit + +@objc(MWMWelcomePageControllerProtocol) +protocol WelcomePageControllerProtocol { + + var view: UIView! { get set } + + func addChildViewController(_ childController: UIViewController) + func closePageController(_ pageController: WelcomePageController) +} + +@objc(MWMWelcomePageController) +final class WelcomePageController: UIPageViewController { + + fileprivate var controllers: [UIViewController] = [] + private var parentController: WelcomePageControllerProtocol! + private var iPadBackgroundView: SolidTouchView? + private var isAnimatingTransition = false + fileprivate var currentController: UIViewController! { + get { + return viewControllers?.first + } + set { + guard let controller = newValue else { return } + let animated = !isAnimatingTransition + setViewControllers([controller], direction: .forward, animated: animated) { [weak self] _ in + self?.isAnimatingTransition = false + } + isAnimatingTransition = animated + } + } + + static func controller(parent: WelcomePageControllerProtocol) -> WelcomePageController? { + let isFirstSession = Alohalytics.isFirstSession() + let welcomeKey = isFirstSession ? FirstLaunchController.key : WhatsNewController.key + guard UserDefaults.standard.bool(forKey: welcomeKey) == false else { return nil } + + let pagesCount = isFirstSession ? FirstLaunchController.pagesCount : WhatsNewController.pagesCount + let id = pagesCount == 1 ? "WelcomePageCurlController" : "WelcomePageScrollController" + let sb = Storyboard.Welcome.instance + let vc = sb.instantiateViewController(withIdentifier: id) as! WelcomePageController + vc.config(parent) + vc.show() + return vc + } + + override func viewDidLoad() { + super.viewDidLoad() + let parentView = parentController.view! + view.backgroundColor = UIColor.white() + if IPAD() { + iPadBackgroundView = SolidTouchView(frame: parentView.bounds) + iPadBackgroundView!.backgroundColor = UIColor.fadeBackground() + iPadBackgroundView!.autoresizingMask = [.flexibleWidth, .flexibleHeight] + parentView.addSubview(iPadBackgroundView!) + view.layer.cornerRadius = 5 + view.clipsToBounds = true + } + currentController = controllers.first + } + + private func config(_ parent: WelcomePageControllerProtocol) { + parentController = parent + let isFirstSession = Alohalytics.isFirstSession() + let pagesCount = isFirstSession ? FirstLaunchController.pagesCount : WhatsNewController.pagesCount + let welcomeClass: WelcomeProtocolBase.Type = isFirstSession ? FirstLaunchController.self : WhatsNewController.self + (0..<pagesCount).forEach { + let vc = welcomeClass.controller($0) + (vc as! WelcomeProtocolBase).pageController = self + controllers.append(vc) + } + dataSource = self + } + + func nextPage() { + let welcomeKey = Alohalytics.isFirstSession() ? FirstLaunchController.key : WhatsNewController.key + Statistics.logEvent(kStatEventName(kStatWhatsNew, welcomeKey), + withParameters: [kStatAction: kStatNext]) + currentController = pageViewController(self, viewControllerAfter: currentController) + } + + func close() { + UserDefaults.standard.set(true, forKey: FirstLaunchController.key) + UserDefaults.standard.set(true, forKey: WhatsNewController.key) + let welcomeKey = Alohalytics.isFirstSession() ? FirstLaunchController.key : WhatsNewController.key + Statistics.logEvent(kStatEventName(kStatWhatsNew, welcomeKey), + withParameters: [kStatAction: kStatClose]) + iPadBackgroundView?.removeFromSuperview() + view.removeFromSuperview() + removeFromParentViewController() + parentController.closePageController(self) + } + + func show() { + let welcomeKey = Alohalytics.isFirstSession() ? FirstLaunchController.key : WhatsNewController.key + Statistics.logEvent(kStatEventName(kStatWhatsNew, welcomeKey), + withParameters: [kStatAction: kStatOpen]) + parentController.addChildViewController(self) + parentController.view.addSubview(view) + updateFrame() + } + + private func updateFrame() { + let parentView = parentController.view! + view.frame = IPAD() ? CGRect(x: parentView.center.x - 260, y: parentView.center.y - 300, width: 520, height: 600) : CGRect(origin: CGPoint(), size: parentView.size) + (currentController as! WelcomeProtocolBase).updateSize() + } + + override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { + super.viewWillTransition(to: size, with: coordinator) + coordinator.animate(alongsideTransition: { [weak self] _ in self?.updateFrame() }, completion: nil) + } +} + +extension WelcomePageController: UIPageViewControllerDataSource { + + func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? { + guard viewController != controllers.first else { return nil } + let index = controllers.index(before: controllers.index(of: viewController)!) + return controllers[index] + } + + func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { + guard viewController != controllers.last else { return nil } + let index = controllers.index(after: controllers.index(of: viewController)!) + return controllers[index] + } + + func presentationCount(for pageViewController: UIPageViewController) -> Int { + return controllers.count + } + + func presentationIndex(for pageViewController: UIPageViewController) -> Int { + guard let vc = currentController else { return 0 } + return controllers.index(of: vc)! + } +} diff --git a/iphone/Maps/UI/Welcome/WelcomeProtocol.swift b/iphone/Maps/UI/Welcome/WelcomeProtocol.swift new file mode 100644 index 0000000000..11e6115549 --- /dev/null +++ b/iphone/Maps/UI/Welcome/WelcomeProtocol.swift @@ -0,0 +1,70 @@ +protocol WelcomeProtocolBase: class { + + static var key: String { get } + + var pageIndex: Int! { get set } + + weak var pageController: WelcomePageController! { get set } + + func updateSize() + + weak var image: UIImageView! { get set } + weak var alertTitle: UILabel! { get set } + weak var alertText: UILabel! { get set } + weak var nextPageButton: UIButton! { get set } + weak var containerWidth: NSLayoutConstraint! { get set } + weak var containerHeight: NSLayoutConstraint! { get set } + weak var imageMinHeight: NSLayoutConstraint! { get set } + weak var imageHeight: NSLayoutConstraint! { get set } + weak var titleTopOffset: NSLayoutConstraint! { get set } + weak var titleImageOffset: NSLayoutConstraint! { get set } +} + +extension WelcomeProtocolBase { + + static var key: String { return "\(self)" + AppInfo.shared().bundleVersion! } + + static func controller(_ pageIndex: Int) -> UIViewController { + let sb = Storyboard.Welcome.instance + let id = String(describing: self) + let vc = sb.instantiateViewController(withIdentifier: id) + (vc as! Self).pageIndex = pageIndex + return vc + } + + func setup(image: UIImage, title: String, text: String, buttonTitle: String, buttonAction: Selector) { + self.image.image = image + alertTitle.text = title + alertText.text = text + nextPageButton.setTitle(buttonTitle, for: .normal) + nextPageButton.addTarget(self, action: buttonAction, for: .touchUpInside) + } + + func updateSize() { + let size = pageController.view!.size + let (width, height) = (size.width, size.height) + let hideImage = (imageHeight.multiplier * height <= imageMinHeight.constant) + titleImageOffset.priority = hideImage ? UILayoutPriorityDefaultLow : UILayoutPriorityDefaultHigh + image.isHidden = hideImage + containerWidth.constant = width + containerHeight.constant = height + } +} + +protocol WelcomeProtocol: WelcomeProtocolBase { + + typealias ConfigBlock = (Self) -> Void + + static var pagesConfigBlocks: [ConfigBlock]! { get } + + func config() +} + +extension WelcomeProtocol { + + static var pagesConfigBlocks: [ConfigBlock]! { return nil } + + static var pagesCount: Int { return pagesConfigBlocks.count } + + func config() { type(of: self).pagesConfigBlocks[pageIndex](self) } +} diff --git a/iphone/Maps/UI/Welcome/WhatsNewController.swift b/iphone/Maps/UI/Welcome/WhatsNewController.swift new file mode 100644 index 0000000000..a08ae36983 --- /dev/null +++ b/iphone/Maps/UI/Welcome/WhatsNewController.swift @@ -0,0 +1,61 @@ +import UIKit + +final class WhatsNewController: MWMViewController, WelcomeProtocol { + + typealias ConfigBlock = (WhatsNewController) -> Void + static var pagesConfigBlocks: [ConfigBlock]! = [{ + $0.setup(image: #imageLiteral(resourceName: "whats_new_traffic"), + title: L("whatsnew_traffic"), + text: L("whatsnew_traffic_text"), + buttonTitle: L("whats_new_next_button"), + buttonAction: #selector(nextPage)) + }, { + $0.setup(image: #imageLiteral(resourceName: "whats_new_traffic_roaming"), + title: L("whatsnew_traffic_roaming"), + text: L("whatsnew_traffic_roaming_text"), + buttonTitle: L("whats_new_next_button"), + buttonAction: #selector(nextPage)) + }, { + $0.setup(image: #imageLiteral(resourceName: "whats_new_update_uber"), + title: L("whatsnew_order_taxi"), + text: L("whatsnew_order_taxi_text"), + buttonTitle: L("done"), + buttonAction: #selector(close)) + }] + + var pageIndex: Int! + weak var pageController: WelcomePageController! + + @IBOutlet weak var image: UIImageView! + @IBOutlet weak var alertTitle: UILabel! + @IBOutlet weak var alertText: UILabel! + @IBOutlet weak var nextPageButton: UIButton! + @IBOutlet weak var containerWidth: NSLayoutConstraint! + @IBOutlet weak var containerHeight: NSLayoutConstraint! + + @IBOutlet weak var imageMinHeight: NSLayoutConstraint! + @IBOutlet weak var imageHeight: NSLayoutConstraint! + + @IBOutlet weak var titleTopOffset: NSLayoutConstraint! + @IBOutlet weak var titleImageOffset: NSLayoutConstraint! + + override func viewDidLoad() { + super.viewDidLoad() + config() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + updateSize() + } + + @objc + private func nextPage() { + pageController.nextPage() + } + + @IBAction + private func close() { + pageController.close() + } +} |