Why am I receiving error -34018 when calling
let itemKey = "My key"
let itemValue = "My secretive bee
I was able to work around this in my app by adding Keychain Access Groups to the Entitlements file. I turned on the Keychain Sharing switch in the Capabilities section in your test app, and it is working for me as well.
Item to add to entitlements:
<key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)com.evgenii.KeychainBugDemo</string> </array>
I have only tried this on macOS Sierra (10.12), so I'm not sure if it will work for you on 10.11.5.