From 777fbfb8dc7d28b5188a27799e8880837450ca14 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 2 Mar 2017 13:02:26 +0300 Subject: [PATCH] [pushwoosh] [ios] Fixed Pushwoosh setup. --- iphone/Maps/Classes/MapsAppDelegate.mm | 3 +-- iphone/Maps/Core/Notifications/MWMPushNotifications.mm | 10 +--------- iphone/Maps/MAPSME.plist | 2 ++ 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 96e7dcbbf0..01a75a7688 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -335,9 +335,8 @@ using namespace osm_auth_ios; else [Alohalytics disable]; [self incrementSessionsCountAndCheckForAlert]; - [MWMPushNotifications setup:launchOptions]; } - + [MWMPushNotifications setup:launchOptions]; [self enableTTSForTheFirstTime]; return returnValue; diff --git a/iphone/Maps/Core/Notifications/MWMPushNotifications.mm b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm index a2b1febae0..c02cdc5547 100644 --- a/iphone/Maps/Core/Notifications/MWMPushNotifications.mm +++ b/iphone/Maps/Core/Notifications/MWMPushNotifications.mm @@ -19,17 +19,9 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken"; + (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]; + [pushManager handlePushReceived:launchOptions]; // make sure we count app open in Pushwoosh stats [pushManager sendAppOpen]; diff --git a/iphone/Maps/MAPSME.plist b/iphone/Maps/MAPSME.plist index 3515b4f175..0f18722f13 100644 --- a/iphone/Maps/MAPSME.plist +++ b/iphone/Maps/MAPSME.plist @@ -2,6 +2,8 @@ + Pushwoosh_APPID + 84E00-0F767 CFBundleDevelopmentRegion en CFBundleDisplayName