Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SecCopyErrorMessageString gives "Use of unresolved identifier" in swift

Trying to use SecCopyErrorMessageString to interpret errorCode. in swift :

    var result: OSStatus
    result = SecItemAdd(query as CFDictionary, nil);


    if result != errSecSuccess {
    let errorDescription = SecCopyErrorMessageString(result,nil)
   //     NSLog("Keychain Error: %@", errorDescription)

The error of "Unresolved identifier" starts from "SecCopyError..."

like image 216
user1470393 Avatar asked Dec 19 '22 21:12

user1470393


1 Answers

The SecCopyErrorMessageString function only became available on iOS in version 11.3. Prior to that, it could only be used on OS X.

like image 135
Tim Avatar answered Dec 28 '22 22:12

Tim