yankodimitrov/SwiftKeychain

Issue with Release build configuration for 64bit

yankodimitrov opened this issue · 1 comments

I found a strange issue that occurs only when I run the code with Release build configuration on 64bit device. Basically Im unable to store or access records in the Keychain. The Keychain returns a status code of 0 (errSecSuccess), but the returned result reference both in SecItemCopyMatching and SecItemAdd contains a nil value.

Here is what I have found during my testing:

1. Build configuration: Debug:
-32bit: working fine;
-64bit: working fine;

2. Build configuration: Release:
-32bit: working fine;
-64bit: unable to access or store items in the Keychain;

If I build only for 32bit architectures and run the code on 64bit device everything is working fine.
I also posted the question on the dev forum: https://devforums.apple.com/thread/255103

Thanks to OOPer and jawbroken from the Apple Developer forum I was able to solve the problem :)