diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index db856dfe14..b6bd097b2f 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -237,7 +237,7 @@ using namespace osm_auth_ios; [self incrementSessionsCountAndCheckForAlert]; //For first launch setup is called by FirstLaunchController - [MWMPushNotifications setup:launchOptions]; + [MWMPushNotifications setup]; } [self enableTTSForTheFirstTime]; diff --git a/iphone/Maps/Core/Notifications/MWMPushNotifications.h b/iphone/Maps/Core/Notifications/MWMPushNotifications.h index a6a2f5b09e..f88ef65516 100644 --- a/iphone/Maps/Core/Notifications/MWMPushNotifications.h +++ b/iphone/Maps/Core/Notifications/MWMPushNotifications.h @@ -2,7 +2,7 @@ @interface MWMPushNotifications : NSObject -+ (void)setup:(NSDictionary *)launchOptions; ++ (void)setup; + (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; diff --git a/iphone/Maps/Core/Notifications/MWMPushNotifications.mm b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm index e70c76fe22..24ae6d1377 100644 --- a/iphone/Maps/Core/Notifications/MWMPushNotifications.mm +++ b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm @@ -23,12 +23,10 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken"; @implementation MWMPushNotifications -+ (void)setup:(NSDictionary *)launchOptions ++ (void)setup { PushNotificationManager * pushManager = [PushNotificationManager pushManager]; - [pushManager handlePushReceived:launchOptions]; - // make sure we count app open in Pushwoosh stats [pushManager sendAppOpen]; @@ -57,8 +55,6 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken"; fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { [Statistics logEvent:kStatEventName(kStatApplication, kStatPushReceived) withParameters:userInfo]; - if (![self handleURLPush:userInfo]) - [[PushNotificationManager pushManager] handlePushReceived:userInfo]; completionHandler(UIBackgroundFetchResultNoData); } diff --git a/iphone/Maps/UI/Welcome/FirstLaunchController.swift b/iphone/Maps/UI/Welcome/FirstLaunchController.swift index 265ce47353..ef4575ffaa 100644 --- a/iphone/Maps/UI/Welcome/FirstLaunchController.swift +++ b/iphone/Maps/UI/Welcome/FirstLaunchController.swift @@ -59,7 +59,7 @@ final class FirstLaunchController: WelcomeViewController { case .location: MWMLocationManager.start() case .notifications: - MWMPushNotifications.setup(nil) + MWMPushNotifications.setup() case .nothing: break }