summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Juick/AppDelegate.m4
-rw-r--r--Juick/Model/User.m2
2 files changed, 4 insertions, 2 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index c3a2f77..aa3a48b 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -41,7 +41,9 @@
} else {
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"FirstRun"] == nil) {
[SAMKeychain deletePasswordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.username"];
- [SAMKeychain deletePasswordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.username"];
+ [SAMKeychain deletePasswordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.password"];
+ [SAMKeychain setAccessibilityType:kSecAttrAccessibleAfterFirstUnlock];
+ [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"FirstRun"];
}
}
return YES;
diff --git a/Juick/Model/User.m b/Juick/Model/User.m
index 4043894..848fc2a 100644
--- a/Juick/Model/User.m
+++ b/Juick/Model/User.m
@@ -48,7 +48,7 @@
if (statusCode == 400) {
callback(YES);
} else {
- [manager.requestSerializer setAuthorizationHeaderFieldWithUsername:@"" password:@""];
+ [manager.requestSerializer clearAuthorizationHeader];
callback(NO);
}
}];}