[cherry] [release-81-fixes] [ios] Fixed pushwoosh setup.

This commit is contained in:
Ilya Grechuhin 2018-03-06 18:33:01 +03:00 committed by Roman Kuznetsov
parent 11ad2c010d
commit 7a9fef705c
4 changed files with 2 additions and 8 deletions

View file

@ -495,7 +495,6 @@ using namespace osm_auth_ios;
- (void)applicationDidBecomeActive:(UIApplication *)application
{
LOG(LINFO, ("applicationDidBecomeActive - begin"));
NSLog(@"Pushwoosh token: %@", [MWMPushNotifications pushToken]);
TrackMarketingAppLaunch();

View file

@ -143,10 +143,6 @@ void checkFlurryLogStatus(FlurryEventRecordStatus status)
[[self instance] logEvent:eventName withParameters:parameters atLocation:location];
}
@end
@implementation Statistics (ConnectionTypeLogging)
+ (NSString *)connectionTypeString
{
switch (Platform::ConnectionStatus())

View file

@ -10,6 +10,4 @@
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
+ (NSString *)pushToken;
@end

View file

@ -41,6 +41,7 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken";
{
PushNotificationManager * pushManager = [PushNotificationManager pushManager];
[pushManager handlePushRegistration:deviceToken];
NSLog(@"Pushwoosh token: %@", [pushManager getPushToken]);
[Alohalytics logEvent:kPushDeviceTokenLogEvent withValue:pushManager.getHWID];
}
@ -48,6 +49,7 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken";
didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[[PushNotificationManager pushManager] handlePushRegistrationFailure:error];
[[Crashlytics sharedInstance] recordError:error];
}
+ (void)application:(UIApplication *)application
@ -76,5 +78,4 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken";
return YES;
}
+ (NSString *)pushToken { return [[PushNotificationManager pushManager] getPushToken]; }
@end