I have updated my simulator to iOS 10 and after a fresh new install of my app, i'm trying to save information in the keychain and it now crash with StatusCode -34018...
SecStatusCode returnCode;
var match = SecKeyChain.QueryAsRecord(query, out returnCode);
if (match == null)
{
var s = new SecRecord(SecKind.GenericPassword)
{
Label = DEVICE_IDENTIFIER_LABEL,
Description = DEVICE_DESCRIPTION,
ValueData = NSData.FromString(uuid),
Accessible = SecAccessible.Always
};
returnCode = SecKeyChain.Add(s);
}
returnCode is returning -34018... I have no idea what's that mean and found nothing about it. I found those related code in the Assembly Browser though:
public enum SecStatusCode
{
Success,
Unimplemented = -4,
IO = -36,
OpWr = -49,
Param = -50,
Allocate = -108,
UserCanceled = -128,
BadReq = -909,
InternalComponent = -2070,
NotAvailable = -25291,
ReadOnly = -25292,
AuthFailed = -25293,
NoSuchKeyChain = -25294,
InvalidKeyChain = -25295,
DuplicateKeyChain = -25296,
DuplicateItem = -25299,
ItemNotFound = -25300,
InteractionNotAllowed = -25308,
Decode = -26275,
VerifyFailed = -67808
}