Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Unable to query SecKeyChain for identity. Bug?

I'm adding identity to SecKeyChain and then I'm trying to get it back using SecKeyChain.QueryAsConcreteType. But using any SecRecord query I get SecStatusCode.Param. Looks like the problem is that when I use new SecRecord(SecKind.Identity) it doesn't put kSecClass to dictionary that is Ok for adding but fails querying.

public SecRecord(SecKind secKind)
IntPtr num = SecClass.FromSecKind(secKind);
if (num == SecClass.Identity)
this._queryDict = new NSMutableDictionary();
this.queryDict = NSMutableDictionary.LowlevelFromObjectAndKey(num, SecClass.SecClassKey);

If I'm wrong, please explain me how to add identity to SecKeyChain and then retrieve it.
Thank you!

Sign In or Register to comment.