summaryrefslogtreecommitdiff
path: root/Juick/APIClient.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-25 10:37:21 +0300
committerGravatar Vitaly Takmazov2018-12-25 10:44:07 +0300
commitc22688421066a358b1980f4399f421000febdaac (patch)
treef48ac07d5e95b79e928cba1dc89f55e2517f07ed /Juick/APIClient.m
parentda64667f6ef19bfeedb8b4b40d875fcd10d4ef6c (diff)
PDKeychainBindingsController -> SAMKeychain
Diffstat (limited to 'Juick/APIClient.m')
-rw-r--r--Juick/APIClient.m5
1 files changed, 2 insertions, 3 deletions
diff --git a/Juick/APIClient.m b/Juick/APIClient.m
index 3c91173..b812057 100644
--- a/Juick/APIClient.m
+++ b/Juick/APIClient.m
@@ -6,7 +6,6 @@
// Copyright © 2016 com.juick. All rights reserved.
//
#import "APIClient.h"
-#import "PDKeychainBindings.h"
#import "Message.h"
#import "Chat.h"
@@ -32,9 +31,9 @@
self.manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:baseURLString]];
self.manager.requestSerializer = [AFJSONRequestSerializer new];
[self.manager.requestSerializer setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
- NSString *username = [[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"];
+ NSString *username = [SAMKeychain passwordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.username"];
if (username) {
- [self.manager.requestSerializer setAuthorizationHeaderFieldWithUsername:username password:[[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.password"]];
+ [self.manager.requestSerializer setAuthorizationHeaderFieldWithUsername:username password:[SAMKeychain passwordForService:[[NSBundle mainBundle] bundleIdentifier] account:@"com.juick.password"]];
}
self.backgroundQueue = [NSOperationQueue new];
self.dateFormatter = [[NSDateFormatter alloc] init];