SecKeyChain.QueryAsConcreteType(SecRecord, SecStatusCode) SecKeyChain.QueryAsConcreteType(SecRecord, SecStatusCode) Method

Definition

Use this method to query the KeyChain and get back a SecCertificate, a SecKey or a SecIdentity.

public static object QueryAsConcreteType (Security.SecRecord query, out Security.SecStatusCode result);
static member QueryAsConcreteType : Security.SecRecord *  -> obj

Parameters

query
SecRecord SecRecord

The query used to lookup the value on the keychain.

result
SecStatusCode SecStatusCode

Returns the status code from calling SecItemCopyMatching.

Returns

An object that can be one of SecCertificate, a SecKey or a SecIdentity or null if there is no value found.

Remarks

This method will throw an exception if the KeyChain contains a new data type that you have introduced with a newer version of Xamarin.iOS into the keychain and you then try to use this with an older version that does not have the ability of decoding theve value.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnRef set to true.

Applies to