Closed MJegorovas closed 7 months ago
Thanks. I don't completely understand what happens here but I see that we can sometimes get null returns from CFDictionaryGetValue
which I didn't realize would actually happen in practice. I should have done more testing when adding the parameterless constructor because it's a little different/dangerous how it picks up everything and we can't make as many assumptions about the data that's in there.
Pushed some edits. Sorry that it kills some of the code you had in the git blame, but I'll leave the commits separate so you don't completely lose credit.
There is an edge case with creating
KeychainSettings
on Mac with no name and callingkeys
variable. BecausekSecAttrService
is not set you get a bunch of random values which might not havekSecAttrAccount
set so the call fails withNullPointerException
. Not sure if the fix style and new test assertion work for you, just wanted to raise the issue. Tested on m2 mac.