1
1
mirror of https://github.com/VKCOM/vk-ios-sdk.git synced 2024-09-11 06:45:37 +03:00
This commit is contained in:
Oleg Suzhaev 2016-11-08 19:55:54 +03:00
parent a89eb3e326
commit 3ac4f0bcea

View File

@ -230,7 +230,8 @@ static NSString *const PERMISSIONS = @"permissions";
NSMutableDictionary *keychainQuery = [self getKeychainQuery:service];
SecItemDelete((__bridge CFDictionaryRef) keychainQuery);
keychainQuery[(__bridge id) kSecValueData] = [NSKeyedArchiver archivedDataWithRootObject:token];
SecItemAdd((__bridge CFDictionaryRef) keychainQuery, NULL);
OSStatus status = SecItemAdd((__bridge CFDictionaryRef) keychainQuery, NULL);
NSAssert(status == errSecSuccess, @"Unable to store VKAccessToken in keychain. OSStatus: %i. Error Description: https://www.osstatus.com/search/results?platform=all&framework=all&search=%i or https://developer.apple.com/reference/security/1658642-keychain_services", status, status);
}
+ (VKAccessToken *)load:(NSString *)service {