first authenticate depending on app state,
then register for appState changes.
This commit is contained in:
Stephan Diederich 2013-09-19 23:17:19 +02:00
parent 14d4ccaddf
commit 9243d012b9

View File

@ -67,8 +67,6 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
//disabled in the appStore //disabled in the appStore
if([self isAppStoreEnvironment]) return; if([self isAppStoreEnvironment]) return;
[self registerObservers];
switch ([[UIApplication sharedApplication] applicationState]) { switch ([[UIApplication sharedApplication] applicationState]) {
case UIApplicationStateActive: case UIApplicationStateActive:
[self triggerAuthentication]; [self triggerAuthentication];
@ -78,8 +76,11 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
// do nothing, wait for active state // do nothing, wait for active state
break; break;
} }
[self registerObservers];
} }
#pragma mark -
- (void) triggerAuthentication { - (void) triggerAuthentication {
switch (self.validationType) { switch (self.validationType) {
case BITAuthenticatorValidationTypeOnAppActive: case BITAuthenticatorValidationTypeOnAppActive: