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
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: