From b9d2d3098d657ce77da20611fae35f5d28055d0b Mon Sep 17 00:00:00 2001 From: sharekris Date: Fri, 31 Jul 2015 15:04:41 -0700 Subject: [PATCH] Added the IF condition for forwarding failedToRegisterError in case it was recorded. --- Analytics/Integrations/Kahuna/SEGKahunaIntegration.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Analytics/Integrations/Kahuna/SEGKahunaIntegration.m b/Analytics/Integrations/Kahuna/SEGKahunaIntegration.m index b09f8b4b0..2ca7731e4 100644 --- a/Analytics/Integrations/Kahuna/SEGKahunaIntegration.m +++ b/Analytics/Integrations/Kahuna/SEGKahunaIntegration.m @@ -81,6 +81,13 @@ - (void)start // everytime the app comes to foreground. if ([SEGKahunaPushMonitor sharedInstance].kahunaInitialized == NO) { [KahunaAnalytics launchWithKey:apiKey]; + + // If we have a push token registration failure, then call the Kahuna handleNotificationRegistrationFailure method. + if ([SEGKahunaPushMonitor sharedInstance].failedToRegisterError != nil) { + [KahunaAnalytics handleNotificationRegistrationFailure:[SEGKahunaPushMonitor sharedInstance].failedToRegisterError]; + [SEGKahunaPushMonitor sharedInstance].failedToRegisterError = nil; + } + // If we have recorded any push user info, then if ([SEGKahunaPushMonitor sharedInstance].pushInfo != nil) { [KahunaAnalytics handleNotification:[SEGKahunaPushMonitor sharedInstance].pushInfo withApplicationState:[SEGKahunaPushMonitor sharedInstance].applicationState];