diff options
author | Jonathan Willing <jwilling@me.com> | 2013-05-18 20:47:34 -0500 |
---|---|---|
committer | Jonathan Willing <jwilling@me.com> | 2013-05-18 20:47:34 -0500 |
commit | 41ef1e3eee6621d1ae76a358d33859afb9b5013a (patch) | |
tree | b9474ffa57bb93865ee04ab6bfcd07f3e8d0338b /example | |
parent | de90bb23b390da9d5adde5dffe92f0bd75dd5309 (diff) |
resolve issue with non-signed builds in the keychain
Diffstat (limited to 'example')
-rwxr-xr-x | example/common/FXKeychain.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/example/common/FXKeychain.m b/example/common/FXKeychain.m index f4cb4388..f0ba73c0 100755 --- a/example/common/FXKeychain.m +++ b/example/common/FXKeychain.m @@ -105,7 +105,13 @@ NSAssert(!object || (object && data), @"FXKeychain failed to encode object for key '%@', error: %@", key, error); //delete existing data - OSStatus status = SecItemDelete((__bridge CFDictionaryRef)query); + CFTypeRef result; + [query setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnRef]; + OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);//SecItemDelete((__bridge CFDictionaryRef)query); + if (status == errSecSuccess) { + status = SecKeychainItemDelete((SecKeychainItemRef) result); + CFRelease(result); + } //write data if (data) |