New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keychain on iOS #483
Comments
I cannot actually reproduce the error. But you pass a The code below is a minimal sample that works correctly (It's Objective-C code. It's not a pure C code though)
|
Hi, yeah, I realised that - this was a "contrived" example.
must be specified on iOS - I've now added a key successfully. However, when trying to retrieve:
a result code of 0 is returned (success), but ref remains empty. btw, thanks for your speedy reply! |
You should use |
ok, thx. I added the line which I'd missed out and now I'm back to the error -50. So I can't actually get any data into the key... CFDictionaryAddValue( query, kSecValueData, CFSTR( "data" ) ); |
As I said above, passing string object is not correct. Keychain API cannot accept string object as a value data. You have to convert string to CFData.
|
Hi, yeah, sorry, missed that. Looks like it might be working... |
I think the strange thing is that you can pass CFStrings in on Mac and it's fine, iOS needs the CFData. Shame they're not consistent... |
all working - thanks so much for your help. |
Hi, spoke to you via email - I'm not using you code but hope you might be able to give me some insight into an issue with the C API. I'm not a swift programmer, but think we're basically doing the same thing.
This code works fine on Mac, but returns error -50 on iOS, which is errSecParam. Looking through you code it seems this should be supported on iOS.
Cheers
The text was updated successfully, but these errors were encountered: