aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/common
diff options
context:
space:
mode:
authorGravatar Jonathan Willing <jwilling@me.com>2013-05-22 21:17:22 -0500
committerGravatar Jonathan Willing <jwilling@me.com>2013-05-22 21:17:22 -0500
commite2acdd0a2bbb1b188e9b6e8c97d710fef1121e74 (patch)
treebc39f8a6cc3ded6ac1f25f21b197b56957849347 /example/common
parentc25fa58728113165cc39007ec5289d83b1cd33a7 (diff)
resolve build error in iOS example
Diffstat (limited to 'example/common')
-rwxr-xr-xexample/common/FXKeychain.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/example/common/FXKeychain.m b/example/common/FXKeychain.m
index f0ba73c0..4f8bdb83 100755
--- a/example/common/FXKeychain.m
+++ b/example/common/FXKeychain.m
@@ -105,14 +105,18 @@
NSAssert(!object || (object && data), @"FXKeychain failed to encode object for key '%@', error: %@", key, error);
//delete existing data
+#if __IPHONE_4_0 && TARGET_OS_IPHONE
+ OSStatus status = SecItemDelete((__bridge CFDictionaryRef)query);
+#else
CFTypeRef result;
[query setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnRef];
- OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);//SecItemDelete((__bridge CFDictionaryRef)query);
+ OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);
if (status == errSecSuccess) {
status = SecKeychainItemDelete((SecKeychainItemRef) result);
CFRelease(result);
}
-
+#endif
+
//write data
if (data)
{