diff --git a/Classes/BITAuthenticator.m b/Classes/BITAuthenticator.m index 7f9e717433..caf536f6db 100644 --- a/Classes/BITAuthenticator.m +++ b/Classes/BITAuthenticator.m @@ -539,7 +539,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato - (void) cleanupInternalStorage { [self removeKeyFromKeychain:kBITAuthenticatorAuthTokenKey]; [self removeKeyFromKeychain:kBITAuthenticatorAuthTokenTypeKey]; - [self removeKeyFromKeychain:kBITAuthenticatorDidSkipOptionalLogin]; + [[NSUserDefaults standardUserDefaults] removeObjectForKey:kBITAuthenticatorDidSkipOptionalLogin]; [self setLastAuthenticatedVersion:nil]; } diff --git a/Support/HockeySDKTests/BITAuthenticatorTests.m b/Support/HockeySDKTests/BITAuthenticatorTests.m index 887c354a01..26b5760b84 100644 --- a/Support/HockeySDKTests/BITAuthenticatorTests.m +++ b/Support/HockeySDKTests/BITAuthenticatorTests.m @@ -98,6 +98,7 @@ static void *kInstallationIdentification = &kInstallationIdentification; - (void) testThatCleanupWorks { [_sut setAuthenticationToken:@"MyToken" withType:@"udid"]; _sut.lastAuthenticatedVersion = @"1.2"; + [_sut setDidSkipOptionalLogin:YES]; [_sut cleanupInternalStorage];