Skip to content

Commit

Permalink
Added the IF condition for forwarding failedToRegisterError in case i…
Browse files Browse the repository at this point in the history
…t was recorded.
  • Loading branch information
sharekris committed Jul 31, 2015
1 parent b61a927 commit b9d2d30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Analytics/Integrations/Kahuna/SEGKahunaIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit b9d2d30

Please sign in to comment.