Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OCUnit doesn't work with security framework?

When attempting to add secure entries into the keychain using:

SecItemUpdate((CFDictionaryRef)queryKeychain, (CFDictionaryRef)updateAttributes);

I'm getting an errSecNotAvailable error returned but only when running my unit test target. Is the keychain not available during unit testing?

like image 865
Patrick Avatar asked Sep 16 '26 16:09

Patrick


1 Answers

Is the security framework included in the OCUint target?

I just tested and I have no errors, I can add an item and change an item in the Keychain in an OCUint test.

I may have my OCUnit setup differently, I am testing against the app, not including the apps files into my unit test.

like image 167
zaph Avatar answered Sep 19 '26 14:09

zaph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!