diff --git a/AFOAuth2Client/AFOAuth2Client.m b/AFOAuth2Client/AFOAuth2Client.m index db7a1fda..4ac3e900 100644 --- a/AFOAuth2Client/AFOAuth2Client.m +++ b/AFOAuth2Client/AFOAuth2Client.m @@ -297,9 +297,11 @@ + (BOOL)storeCredential:(AFOAuthCredential *)credential NSData *data = [NSKeyedArchiver archivedDataWithRootObject:credential]; [updateDictionary setObject:data forKey:(__bridge id)kSecValueData]; - if( securityAccessibility ) +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 43000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) + if( securityAccessibility && &kSecAttrAccessible != NULL ) [updateDictionary setObject:securityAccessibility forKey:(__bridge id)kSecAttrAccessible]; - +#endif + OSStatus status; BOOL exists = ([self retrieveCredentialWithIdentifier:identifier] != nil);