From 9243d012b97003b10b824016cdaefec355e1a315 Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Thu, 19 Sep 2013 23:17:19 +0200 Subject: [PATCH] cleanup first authenticate depending on app state, then register for appState changes. --- Classes/BITAuthenticator.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/BITAuthenticator.m b/Classes/BITAuthenticator.m index 7f955ce3a7..31643838de 100644 --- a/Classes/BITAuthenticator.m +++ b/Classes/BITAuthenticator.m @@ -67,8 +67,6 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato //disabled in the appStore if([self isAppStoreEnvironment]) return; - [self registerObservers]; - switch ([[UIApplication sharedApplication] applicationState]) { case UIApplicationStateActive: [self triggerAuthentication]; @@ -78,8 +76,11 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato // do nothing, wait for active state break; } + + [self registerObservers]; } +#pragma mark - - (void) triggerAuthentication { switch (self.validationType) { case BITAuthenticatorValidationTypeOnAppActive: